Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
953d0542
Commit
953d0542
authored
Mar 22, 2024
by
Jannik Streidl
Browse files
grammar
parent
6dc4b748
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Dockerfile
Dockerfile
+1
-1
backend/config.py
backend/config.py
+2
-2
backend/start.sh
backend/start.sh
+1
-1
No files found.
Dockerfile
View file @
953d0542
# syntax=docker/dockerfile:1
# syntax=docker/dockerfile:1
# Initialize device type args
# Initialize device type args
# use bui
i
ld 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
...
...
backend/config.py
View file @
953d0542
...
@@ -221,8 +221,8 @@ if OLLAMA_BASE_URL == "" and OLLAMA_API_BASE_URL != "":
...
@@ -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
:
#
I
f you use all
in
one
D
ocker container (
WE
bUI + Ollama)
#
i
f you use all
-
in
-
one
d
ocker container (
Open We
bUI + Ollama)
# with the
d
ocker 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"
...
...
backend/start.sh
View file @
953d0542
#!/usr/bin/env bash
#!/usr/bin/env bash
# Get the INCLUDE_OLLAMA_ENV environment variable wh
c
ih is set in the Dockerfile
# Get the INCLUDE_OLLAMA_ENV environment variable whi
c
h 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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment