This commit is contained in:
		
							
								
								
									
										58
									
								
								docs/docker-compose/Ollama.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								docs/docker-compose/Ollama.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
				
			|||||||
 | 
					Portainer Stack:
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					services:
 | 
				
			||||||
 | 
					  ollama:
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - ${VOLUME_OLLAMA}:/root/.ollama
 | 
				
			||||||
 | 
					    container_name: ollama
 | 
				
			||||||
 | 
					    pull_policy: always
 | 
				
			||||||
 | 
					    tty: true
 | 
				
			||||||
 | 
					    restart: ${RST-unless-stopped}
 | 
				
			||||||
 | 
					    image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
 | 
				
			||||||
 | 
					    network_mode: ${NET-host}
 | 
				
			||||||
 | 
					    deploy:
 | 
				
			||||||
 | 
					      resources:
 | 
				
			||||||
 | 
					        reservations:
 | 
				
			||||||
 | 
					          devices:
 | 
				
			||||||
 | 
					            - driver: nvidia
 | 
				
			||||||
 | 
					              count: 1
 | 
				
			||||||
 | 
					              capabilities: [gpu]
 | 
				
			||||||
 | 
					    labels:
 | 
				
			||||||
 | 
					      - com.centurylinklabs.watchtower.enable=${AutoUpdate-true}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  open-webui:
 | 
				
			||||||
 | 
					    build:
 | 
				
			||||||
 | 
					      context: .
 | 
				
			||||||
 | 
					      args:
 | 
				
			||||||
 | 
					        OLLAMA_BASE_URL: '/ollama'
 | 
				
			||||||
 | 
					      dockerfile: Dockerfile
 | 
				
			||||||
 | 
					    image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
 | 
				
			||||||
 | 
					    container_name: open-webui
 | 
				
			||||||
 | 
					    volumes:
 | 
				
			||||||
 | 
					      - ${VOLUME_OPENWEBUI}:/app/backend/data
 | 
				
			||||||
 | 
					    depends_on:
 | 
				
			||||||
 | 
					      - ollama
 | 
				
			||||||
 | 
					    ports:
 | 
				
			||||||
 | 
					      - ${OPEN_WEBUI_PORT-3000}:8080
 | 
				
			||||||
 | 
					    environment:
 | 
				
			||||||
 | 
					      - 'OLLAMA_BASE_URL=http://ollama:11434'
 | 
				
			||||||
 | 
					      - 'WEBUI_SECRET_KEY='
 | 
				
			||||||
 | 
					    extra_hosts:
 | 
				
			||||||
 | 
					      - host.docker.internal:host-gateway
 | 
				
			||||||
 | 
					    restart: ${RST-unless-stopped}
 | 
				
			||||||
 | 
					    network_mode: ${NET-host}
 | 
				
			||||||
 | 
					    labels:
 | 
				
			||||||
 | 
					      - com.centurylinklabs.watchtower.enable=${AutoUpdate-true}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Environments:
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					WEBUI_DOCKER_TAG=latest
 | 
				
			||||||
 | 
					OLLAMA_DOCKER_TAG=latest
 | 
				
			||||||
 | 
					RST=unless-stopped
 | 
				
			||||||
 | 
					NET=host
 | 
				
			||||||
 | 
					AutoUpdate=true
 | 
				
			||||||
 | 
					VOLUME_OLLAM=/docker/ollama
 | 
				
			||||||
 | 
					VOLUME_OPENWEBUI=/docker/open-webui
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
		Reference in New Issue
	
	Block a user