This commit is contained in:
hiyouga 2024-07-26 11:51:00 +08:00
parent 8a2846cfe1
commit 668654b5ad
3 changed files with 46 additions and 10 deletions

View File

@ -437,7 +437,7 @@ docker compose up -d
docker compose exec llamafactory bash docker compose exec llamafactory bash
``` ```
For ROCm users: For AMD ROCm users:
```bash ```bash
cd docker/docker-rocm/ cd docker/docker-rocm/
@ -504,7 +504,7 @@ docker run -dit \
docker exec -it llamafactory bash docker exec -it llamafactory bash
``` ```
For ROCm users: For AMD ROCm users:
```bash ```bash
docker build -f ./docker/docker-rocm/Dockerfile \ docker build -f ./docker/docker-rocm/Dockerfile \
@ -523,8 +523,8 @@ docker run -dit \
-v ./saves:/app/saves \ -v ./saves:/app/saves \
-p 7860:7860 \ -p 7860:7860 \
-p 8000:8000 \ -p 8000:8000 \
--device=/dev/kfd \ --device /dev/kfd \
--device=/dev/dri \ --device /dev/dri \
--shm-size 16G \ --shm-size 16G \
--name llamafactory \ --name llamafactory \
llamafactory:latest llamafactory:latest

View File

@ -425,16 +425,24 @@ CUDA 用户:
```bash ```bash
cd docker/docker-cuda/ cd docker/docker-cuda/
docker-compose up -d docker compose up -d
docker-compose exec llamafactory bash docker compose exec llamafactory bash
``` ```
昇腾 NPU 用户: 昇腾 NPU 用户:
```bash ```bash
cd docker/docker-npu/ cd docker/docker-npu/
docker-compose up -d docker compose up -d
docker-compose exec llamafactory bash docker compose exec llamafactory bash
```
AMD ROCm 用户:
```bash
cd docker/docker-rocm/
docker compose up -d
docker compose exec llamafactory bash
``` ```
<details><summary>不使用 Docker Compose 构建</summary> <details><summary>不使用 Docker Compose 构建</summary>
@ -496,6 +504,34 @@ docker run -dit \
docker exec -it llamafactory bash docker exec -it llamafactory bash
``` ```
AMD ROCm 用户:
```bash
docker build -f ./docker/docker-rocm/Dockerfile \
--build-arg INSTALL_BNB=false \
--build-arg INSTALL_VLLM=false \
--build-arg INSTALL_DEEPSPEED=false \
--build-arg INSTALL_FLASHATTN=false \
--build-arg PIP_INDEX=https://pypi.org/simple \
-t llamafactory:latest .
docker run -dit \
-v ./hf_cache:/root/.cache/huggingface \
-v ./ms_cache:/root/.cache/modelscope \
-v ./data:/app/data \
-v ./output:/app/output \
-v ./saves:/app/saves \
-p 7860:7860 \
-p 8000:8000 \
--device /dev/kfd \
--device /dev/dri \
--shm-size 16G \
--name llamafactory \
llamafactory:latest
docker exec -it llamafactory bash
```
</details> </details>
<details><summary>数据卷详情</summary> <details><summary>数据卷详情</summary>