mirror of
				https://github.com/hiyouga/LLaMA-Factory.git
				synced 2025-11-04 18:02:19 +08:00 
			
		
		
		
	fix docker compose usage
Former-commit-id: 59a5bd5d5c8d2a44e2dad26b74e77a45e109c8d6
This commit is contained in:
		
							parent
							
								
									fe2c7eaa93
								
							
						
					
					
						commit
						41beb7f0a3
					
				
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								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><summary>Details about volume</summary>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								README_zh.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
<details><summary>数据卷详情</summary>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user