From 947a34f53b74e4cd2b964941cf1580bcabde2228 Mon Sep 17 00:00:00 2001 From: hiyouga <467089858@qq.com> Date: Thu, 13 Jun 2024 00:07:48 +0800 Subject: [PATCH] fix docker compose usage --- README.md | 10 ++++++++-- README_zh.md | 10 ++++++++-- docker-compose.yml | 5 +++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a773a5f4..65964560 100644 --- a/README.md +++ b/README.md @@ -423,6 +423,8 @@ llamafactory-cli webui ### Build Docker +#### Use Docker + ```bash docker build -f ./Dockerfile \ --build-arg INSTALL_BNB=false \ @@ -442,8 +444,12 @@ docker run -it --gpus=all \ llamafactory:latest ``` -> [!TIP] -> Use Docker Compose to build image via `docker-compose up -d`. +#### Use Docker Compose + +```bash +docker-compose up -d +docker-compose exec -it llamafactory bash +```
Details about volume diff --git a/README_zh.md b/README_zh.md index 7a9cb159..7962a6d1 100644 --- a/README_zh.md +++ b/README_zh.md @@ -423,6 +423,8 @@ llamafactory-cli webui ### 构建 Docker +#### 使用 Docker + ```bash docker build -f ./Dockerfile \ --build-arg INSTALL_BNB=false \ @@ -442,8 +444,12 @@ docker run -it --gpus=all \ llamafactory:latest ``` -> [!TIP] -> 通过 `docker-compose up -d` 使用 Docker Compose 构建镜像。 +#### 使用 Docker Compose + +```bash +docker-compose up -d +docker-compose exec -it llamafactory bash +```
数据卷详情 diff --git a/docker-compose.yml b/docker-compose.yml index b3e4a34d..c5dc34e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '3.8' - services: llamafactory: build: @@ -19,6 +17,9 @@ services: - "7860:7860" - "8000:8000" ipc: host + tty: true + stdin_open: true + command: bash deploy: resources: reservations: