forked from p04798526/LLaMA-Factory-Mirror
fix docker compose usage
This commit is contained in:
parent
2ce2e5bc47
commit
947a34f53b
10
README.md
10
README.md
|
@ -423,6 +423,8 @@ llamafactory-cli webui
|
||||||
|
|
||||||
### Build Docker
|
### Build Docker
|
||||||
|
|
||||||
|
#### Use Docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -f ./Dockerfile \
|
docker build -f ./Dockerfile \
|
||||||
--build-arg INSTALL_BNB=false \
|
--build-arg INSTALL_BNB=false \
|
||||||
|
@ -442,8 +444,12 @@ docker run -it --gpus=all \
|
||||||
llamafactory:latest
|
llamafactory:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!TIP]
|
#### Use Docker Compose
|
||||||
> Use Docker Compose to build image via `docker-compose up -d`.
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
docker-compose exec -it llamafactory bash
|
||||||
|
```
|
||||||
|
|
||||||
<details><summary>Details about volume</summary>
|
<details><summary>Details about volume</summary>
|
||||||
|
|
||||||
|
|
10
README_zh.md
10
README_zh.md
|
@ -423,6 +423,8 @@ llamafactory-cli webui
|
||||||
|
|
||||||
### 构建 Docker
|
### 构建 Docker
|
||||||
|
|
||||||
|
#### 使用 Docker
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker build -f ./Dockerfile \
|
docker build -f ./Dockerfile \
|
||||||
--build-arg INSTALL_BNB=false \
|
--build-arg INSTALL_BNB=false \
|
||||||
|
@ -442,8 +444,12 @@ docker run -it --gpus=all \
|
||||||
llamafactory:latest
|
llamafactory:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!TIP]
|
#### 使用 Docker Compose
|
||||||
> 通过 `docker-compose up -d` 使用 Docker Compose 构建镜像。
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
docker-compose exec -it llamafactory bash
|
||||||
|
```
|
||||||
|
|
||||||
<details><summary>数据卷详情</summary>
|
<details><summary>数据卷详情</summary>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
llamafactory:
|
llamafactory:
|
||||||
build:
|
build:
|
||||||
|
@ -19,6 +17,9 @@ services:
|
||||||
- "7860:7860"
|
- "7860:7860"
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
ipc: host
|
ipc: host
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
command: bash
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
reservations:
|
reservations:
|
||||||
|
|
Loading…
Reference in New Issue