compose.yaml 804 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
3
4
version: '3.6'

services:
  ollama:
Timothy J. Baek's avatar
Timothy J. Baek committed
5
    # Uncomment below for GPU support
Timothy J. Baek's avatar
Timothy J. Baek committed
6
7
8
9
10
11
12
13
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: 1
    #           capabilities:
    #             - gpu
Timothy J. Baek's avatar
Timothy J. Baek committed
14
15
16
    volumes:
      - ollama:/root/.ollama
    ports:
Timothy J. Baek's avatar
Timothy J. Baek committed
17
      - 127.0.0.1:11434:11434
Timothy J. Baek's avatar
Timothy J. Baek committed
18
19
20
21
22
23
24
25
26
27
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:latest

  ollama-webui:
    build:
      context: .
      args:
28
        OLLAMA_API_BASE_URL: '/ollama/api'
Timothy J. Baek's avatar
Timothy J. Baek committed
29
30
31
32
33
      dockerfile: Dockerfile
    image: ollama-webui:latest
    container_name: ollama-webui
    ports:
      - 3000:8080
34
35
36
    extra_hosts:
        - host.docker.internal:host-gateway
    restart: unless-stopped
Timothy J. Baek's avatar
Timothy J. Baek committed
37
38
39

volumes:
  ollama: {}