This commit is contained in:
Jannik Streidl 2024-03-22 09:55:46 +01:00
parent 6dc4b748fb
commit 953d05428e
3 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
# Initialize device type args # Initialize device type args
# use buiild args in the docker build commmand with --build-arg="BUILDARG=true" # use build args in the docker build commmand with --build-arg="BUILDARG=true"
ARG USE_CUDA=false ARG USE_CUDA=false
ARG USE_MPS=false ARG USE_MPS=false
ARG INCLUDE_OLLAMA=false ARG INCLUDE_OLLAMA=false

View file

@ -221,8 +221,8 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "":
if ENV == "prod": if ENV == "prod":
if OLLAMA_BASE_URL == "/ollama": if OLLAMA_BASE_URL == "/ollama":
if INCLUDE_OLLAMA: if INCLUDE_OLLAMA:
# If you use all in one Docker container (WEbUI + Ollama) # if you use all-in-one docker container (Open WebUI + Ollama)
# with the docker build arg INCLUDE_OLLAMA=true (--build-arg="INCLUDE_OLLAMA=true") this only works with http://localhost:11434 # with the ocker build arg INCLUDE_OLLAMA=true (--build-arg="INCLUDE_OLLAMA=true") this only works with http://localhost:11434
OLLAMA_BASE_URL = "http://localhost:11434" OLLAMA_BASE_URL = "http://localhost:11434"
else: else:
OLLAMA_BASE_URL = "http://host.docker.internal:11434" OLLAMA_BASE_URL = "http://host.docker.internal:11434"

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Get the INCLUDE_OLLAMA_ENV environment variable whcih is set in the Dockerfile # Get the INCLUDE_OLLAMA_ENV environment variable which is set in the Dockerfile
# This includes the ollama in the image # This includes the ollama in the image
INCLUDE_OLLAMA=${INCLUDE_OLLAMA_ENV:-false} INCLUDE_OLLAMA=${INCLUDE_OLLAMA_ENV:-false}