oopshnik commited on
Commit
13c4c93
·
1 Parent(s): 8550db6
Files changed (2) hide show
  1. Dockerfile +9 -23
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -1,29 +1,15 @@
1
- FROM ghcr.io/open-webui/open-webui:main
2
 
3
- WORKDIR /app/backend
4
 
5
- RUN mkdir -p /app/backend/static
6
- RUN mkdir -p /app/backend/data
7
- RUN mkdir -p /app/cache
8
 
9
- # Install necessary dependencies
10
- RUN apt-get update && apt-get install -y apache2-utils sqlite3
11
 
12
- # Update the password in webui.db
13
- # COPY webui.db /webui.db
14
- # RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
15
- # htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
16
- # sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
17
- # rm /tmp/password_hash
18
 
19
- # Copy the updated webui.db to the desired location
20
- # RUN cp /webui.db /app/backend/data/webui.db
21
- COPY webui.db /app/backend/data/webui.db
22
 
23
- RUN chmod -R 777 /app/backend/static
24
- RUN chmod -R 777 /app/backend/data
25
- RUN chmod -R 777 /app/cache
26
-
27
- EXPOSE 7860
28
-
29
- CMD ["bash", "start.sh"]
 
 
1
 
2
+ FROM python:3.12
3
 
4
+ RUN useradd -m -u 1000 user
5
+ USER user
6
+ ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
+ WORKDIR /app
 
9
 
10
+ COPY --chown=user ./requirements.txt requirements.txt
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
12
 
13
+ COPY --chown=user . /app
14
+ CMD ["open-webui", "serve", "--host", "0.0.0.0", "--port", "7860"]
 
15
 
 
 
 
 
 
 
 
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ open-webui