diff --git a/README.md b/README.md index 0c9025eb..da880393 100644 --- a/README.md +++ b/README.md @@ -437,7 +437,7 @@ docker compose up -d docker compose exec llamafactory bash ``` -For ROCm users: +For AMD ROCm users: ```bash cd docker/docker-rocm/ @@ -504,7 +504,7 @@ docker run -dit \ docker exec -it llamafactory bash ``` -For ROCm users: +For AMD ROCm users: ```bash docker build -f ./docker/docker-rocm/Dockerfile \ @@ -523,8 +523,8 @@ docker run -dit \ -v ./saves:/app/saves \ -p 7860:7860 \ -p 8000:8000 \ - --device=/dev/kfd \ - --device=/dev/dri \ + --device /dev/kfd \ + --device /dev/dri \ --shm-size 16G \ --name llamafactory \ llamafactory:latest diff --git a/README_zh.md b/README_zh.md index 578d2960..90c8b928 100644 --- a/README_zh.md +++ b/README_zh.md @@ -425,16 +425,24 @@ CUDA 用户: ```bash cd docker/docker-cuda/ -docker-compose up -d -docker-compose exec llamafactory bash +docker compose up -d +docker compose exec llamafactory bash ``` 昇腾 NPU 用户: ```bash cd docker/docker-npu/ -docker-compose up -d -docker-compose exec llamafactory bash +docker compose up -d +docker compose exec llamafactory bash +``` + +AMD ROCm 用户: + +```bash +cd docker/docker-rocm/ +docker compose up -d +docker compose exec llamafactory bash ```
不使用 Docker Compose 构建 @@ -496,6 +504,34 @@ docker run -dit \ 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 +``` +
数据卷详情 diff --git a/docker/docker-rocm/docker-compose.yml b/docker/docker-rocm/docker-compose.yml index 059d576f..923bd067 100644 --- a/docker/docker-rocm/docker-compose.yml +++ b/docker/docker-rocm/docker-compose.yml @@ -23,7 +23,7 @@ services: tty: true stdin_open: true command: bash - devices: - - /dev/kfd:/dev/kfd + devices: + - /dev/kfd:/dev/kfd - /dev/dri:/dev/dri restart: unless-stopped