Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.8'
- name: ollama
- services:
- {{ ollama_application.name }}:
- image: ollama/ollama:{{ ollama_application.version }}
- container_name: ollama
- environment:
- - OLLAMA_MODELS=/models
- - NVIDIA_VISIBLE_DEVICES=1
- ports:
- - "{{ ollama_infrastructure.api_port }}:11434"
- volumes:
- - {{ ollama_infrastructure.data_directory }}:/root/.ollama
- - {{ ollama_infrastructure.model_library_directory }}:/models
- deploy:
- resources:
- reservations:
- devices:
- - driver: nvidia
- count: 1
- capabilities: [gpu]
- restart: unless-stopped
- {{ ollama_application.name }}-webui:
- image: ghcr.io/open-webui/open-webui:main
- container_name: open-webui
- ports:
- - "{{ ollama_infrastructure.web_port }}:8080"
- extra_hosts:
- - "host.docker.internal:host-gateway"
- volumes:
- - {{ ollama_infrastructure.web_directory }}:/app/backend/data
- restart: unless-stopped
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement