Zuletzt aktiv 1728786943

LLaMA-Factory-16.sh Orginalformat
1# Choose docker image upon your environment
2docker build -f ./docker/docker-npu/Dockerfile \
3 --build-arg INSTALL_DEEPSPEED=false \
4 --build-arg PIP_INDEX=https://pypi.org/simple \
5 -t llamafactory:latest .
6
7# Change `device` upon your resources
8docker run -dit \
9 -v ./hf_cache:/root/.cache/huggingface \
10 -v ./ms_cache:/root/.cache/modelscope \
11 -v ./om_cache:/root/.cache/openmind \
12 -v ./data:/app/data \
13 -v ./output:/app/output \
14 -v /usr/local/dcmi:/usr/local/dcmi \
15 -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
16 -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
17 -v /etc/ascend_install.info:/etc/ascend_install.info \
18 -p 7860:7860 \
19 -p 8000:8000 \
20 --device /dev/davinci0 \
21 --device /dev/davinci_manager \
22 --device /dev/devmm_svm \
23 --device /dev/hisi_hdc \
24 --shm-size 16G \
25 --name llamafactory \
26 llamafactory:latest
27
28docker exec -it llamafactory bash