valiantlynx / ollama-docker

Welcome to the Ollama Docker Compose Setup! This project simplifies the deployment of Ollama using Docker Compose, making it easy to run Ollama with all its dependencies in a containerized environment
https://ollama-docker.azurewebsites.net/
Other
455 stars 93 forks source link

no work when changing ollama port #6

Closed choigawoon closed 3 months ago

choigawoon commented 4 months ago

when changing ollama service port, webui cannot recognize it.

version: "3.8"

services:
  # app:
  #   build: .
  #   ports:
  #     - 8000:8000
  #     - 5678:5678
  #   volumes:
  #     - .:/code
  #   command: uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload
  #   restart: always
  #   depends_on:
  #     - ollama
  #     - ollama-webui
  #   networks:
  #     - ollama-docker

  ollama:
    volumes:
      - ./ollama/ollama:/root/.ollama
    container_name: ollama
    pull_policy: always
    tty: true
    restart: unless-stopped
    image: ollama/ollama:latest
    ports:
      - 7869:11434
    networks:
      - ollama-docker
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

  ollama-webui:
    image: ghcr.io/ollama-webui/ollama-webui:main
    container_name: ollama-webui
    volumes:
      - ./ollama/ollama-webui:/app/backend/data
    depends_on:
      - ollama
    ports:
      - 3004:8080
    environment:
      - "/ollama/api=http://ollama:7869/api"
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped
    networks:
      - ollama-docker

networks:
  ollama-docker:
    external: false
valiantlynx commented 4 months ago

it seems like that is an issue with ollama-webui itself, which i dont maintain, but i'll check it out

valiantlynx commented 4 months ago

id recommend you make an issue directly to them: https://github.com/ollama-webui/ollama-webui-lite

they are just a light version of https://github.com/open-webui/open-webui so if you want you can use open-webui(rebranded from ollama-webui). the chat is a bit weird to use though

valiantlynx commented 3 months ago

i fixed the issue in the latest commit