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
b6d9cf3b
Unverified
Commit
b6d9cf3b
authored
Jan 23, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Jan 23, 2024
Browse files
Merge pull request #553 from baumandm/chore/fast-docker-builds
chore: optimize dockerfile order for caching
parents
ca943d07
255fbb3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
.dockerignore
.dockerignore
+3
-0
Dockerfile
Dockerfile
+12
-13
No files found.
.dockerignore
View file @
b6d9cf3b
.github
.DS_Store
.DS_Store
docs
kubernetes
node_modules
node_modules
/.svelte-kit
/.svelte-kit
/package
/package
...
...
Dockerfile
View file @
b6d9cf3b
...
@@ -26,26 +26,14 @@ ENV OPENAI_API_KEY ""
...
@@ -26,26 +26,14 @@ ENV OPENAI_API_KEY ""
ENV
WEBUI_JWT_SECRET_KEY "SECRET_KEY"
ENV
WEBUI_JWT_SECRET_KEY "SECRET_KEY"
WORKDIR
/app
# copy embedding weight from build
RUN
mkdir
-p
/root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
COPY
--from=build /app/onnx.tar.gz /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
RUN
cd
/root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
&&
\
tar
-xzf
onnx.tar.gz
# copy built frontend files
COPY
--from=build /app/build /app/build
WORKDIR
/app/backend
WORKDIR
/app/backend
# install python dependencies
COPY
./backend/requirements.txt ./requirements.txt
COPY
./backend/requirements.txt ./requirements.txt
RUN
pip3
install
torch torchvision torchaudio
--index-url
https://download.pytorch.org/whl/cpu
--no-cache-dir
RUN
pip3
install
torch torchvision torchaudio
--index-url
https://download.pytorch.org/whl/cpu
--no-cache-dir
RUN
pip3
install
-r
requirements.txt
--no-cache-dir
RUN
pip3
install
-r
requirements.txt
--no-cache-dir
# Install pandoc
# Install pandoc
# RUN python -c "import pypandoc; pypandoc.download_pandoc()"
# RUN python -c "import pypandoc; pypandoc.download_pandoc()"
RUN
apt-get update
\
RUN
apt-get update
\
...
@@ -54,6 +42,17 @@ RUN apt-get update \
...
@@ -54,6 +42,17 @@ RUN apt-get update \
# RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('all-MiniLM-L6-v2')"
# RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('all-MiniLM-L6-v2')"
# copy embedding weight from build
RUN
mkdir
-p
/root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
COPY
--from=build /app/onnx.tar.gz /root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
RUN
cd
/root/.cache/chroma/onnx_models/all-MiniLM-L6-v2
&&
\
tar
-xzf
onnx.tar.gz
# copy built frontend files
COPY
--from=build /app/build /app/build
# copy backend files
COPY
./backend .
COPY
./backend .
CMD
[ "sh", "start.sh"]
CMD
[ "sh", "start.sh"]
\ No newline at end of file
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