2023-10-30 20:52:45 +01:00
|
|
|
version: '3.6'
|
|
|
|
|
|
|
|
services:
|
|
|
|
ollama:
|
2023-10-31 03:28:05 +01:00
|
|
|
# Uncomment below for GPU support
|
2023-10-30 21:12:33 +01:00
|
|
|
# deploy:
|
|
|
|
# resources:
|
|
|
|
# reservations:
|
|
|
|
# devices:
|
|
|
|
# - driver: nvidia
|
|
|
|
# count: 1
|
|
|
|
# capabilities:
|
|
|
|
# - gpu
|
2023-10-30 20:52:45 +01:00
|
|
|
volumes:
|
|
|
|
- ollama:/root/.ollama
|
2023-11-17 19:38:29 +01:00
|
|
|
# Uncomment below to expose Ollama API outside the container stack
|
|
|
|
# ports:
|
|
|
|
# - 11434:11434
|
2023-10-30 20:52:45 +01:00
|
|
|
container_name: ollama
|
|
|
|
pull_policy: always
|
|
|
|
tty: true
|
|
|
|
restart: unless-stopped
|
|
|
|
image: ollama/ollama:latest
|
|
|
|
|
2023-11-22 22:24:53 +01:00
|
|
|
|
|
|
|
# Uncomment below for WIP: Auth support
|
2023-11-22 21:54:48 +01:00
|
|
|
# ollama-webui-db:
|
|
|
|
# image: mongo
|
|
|
|
# container_name: ollama-webui-db
|
|
|
|
# restart: always
|
|
|
|
# # Make sure to change the username/password!
|
|
|
|
# environment:
|
|
|
|
# MONGO_INITDB_ROOT_USERNAME: root
|
|
|
|
# MONGO_INITDB_ROOT_PASSWORD: example
|
2023-11-19 01:47:12 +01:00
|
|
|
|
2023-10-30 20:52:45 +01:00
|
|
|
ollama-webui:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
args:
|
2023-11-15 01:42:10 +01:00
|
|
|
OLLAMA_API_BASE_URL: '/ollama/api'
|
2023-10-30 20:52:45 +01:00
|
|
|
dockerfile: Dockerfile
|
|
|
|
image: ollama-webui:latest
|
|
|
|
container_name: ollama-webui
|
2023-11-17 19:38:29 +01:00
|
|
|
depends_on:
|
|
|
|
- ollama
|
2023-11-22 22:24:53 +01:00
|
|
|
# Uncomment below for WIP: Auth support
|
2023-11-22 21:54:48 +01:00
|
|
|
# - ollama-webui-db
|
2023-10-30 20:52:45 +01:00
|
|
|
ports:
|
|
|
|
- 3000:8080
|
2023-11-17 19:38:29 +01:00
|
|
|
environment:
|
|
|
|
- "OLLAMA_API_BASE_URL=http://ollama:11434/api"
|
2023-11-22 22:24:53 +01:00
|
|
|
# Uncomment below for WIP: Auth support
|
2023-11-22 21:58:14 +01:00
|
|
|
# - "WEBUI_AUTH=TRUE"
|
|
|
|
# - "WEBUI_DB_URL=mongodb://root:example@ollama-webui-db:27017/"
|
|
|
|
# - "WEBUI_JWT_SECRET_KEY=SECRET_KEY"
|
2023-11-15 01:42:10 +01:00
|
|
|
extra_hosts:
|
2023-11-17 19:38:29 +01:00
|
|
|
- host.docker.internal:host-gateway
|
2023-11-15 01:42:10 +01:00
|
|
|
restart: unless-stopped
|
2023-10-30 20:52:45 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
ollama: {}
|