papaduvalier commited on
Commit
7297b3a
·
verified ·
1 Parent(s): 5bc64c1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -25
Dockerfile CHANGED
@@ -1,28 +1,24 @@
 
 
1
  FROM ghcr.io/open-webui/open-webui:main
2
- #WORKDIR /app
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- #RUN mkdir -p /app/backend/open_webui/static
5
- #RUN mkdir -p /app/backend/data
6
- #RUN mkdir -p /data/cache
7
 
8
- RUN apt-get update && apt-get install -y python3 python3-pip curl sqlite3
9
- RUN pip3 install --no-cache-dir webdavclient3 requests hf_xet
10
-
11
- COPY sync_data.sh sync_data.sh
12
- COPY webui3.db /webui.db
13
- RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
14
- htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
15
- sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
16
- rm /tmp/password_hash
17
-
18
- #RUN chmod -R 777 /app/backend/open_webui/static
19
- #RUN chmod -R 777 /app/backend/data
20
- #RUN chmod -R 777 /data
21
-
22
- #EXPOSE 7860
23
-
24
-
25
- RUN chmod -R 775 ./data && \
26
- chmod -R 775 /app/backend/open_webui/static && \
27
- chmod +x sync_data.sh && \
28
- sed -i "1r sync_data.sh" ./start.sh
 
1
+ # FROM fossandroid/openwebui:latest
2
+ # FROM ghcr.io/open-webui/open-webui:main
3
  FROM ghcr.io/open-webui/open-webui:main
4
+ RUN apt update \
5
+ && apt install gcc curl sudo -y
6
+ # RUN apt install apt-transport-https \
7
+ # ca-certificates \
8
+ # curl \
9
+ # gnupg -y
10
+ # RUN curl -fsSL https://gvisor.dev/archive.key | sudo gpg --dearmor -o /usr/share/keyrings/gvisor-archive-keyring.gpg
11
+ # RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gvisor-archive-keyring.gpg] https://storage.googleapis.com/gvisor/releases release main" | sudo tee /etc/apt/sources.list.d/gvisor.list > /dev/null
12
+ # RUN sudo apt-get update && sudo apt-get install -y runsc
13
+ # RUN sudo mkdir -p /sys/fs/cgroup/cgroup.subtree_control
14
+ # # LABEL space_runtime_configs='{"runtime": "cuda-11.8", "privileged": true}'
15
+ # LABEL space_runtime_configs='{"runtime": "cuda-11.8", "privileged": true, "disable_resource_limits": true}'
16
 
 
 
 
17
 
18
+ # 创建目录并设置正确的权限
19
+ RUN sudo find / \
20
+ -path /proc -prune -o \
21
+ -path /etc -prune -o \
22
+ -path /dev -prune -o \
23
+ -path /usr -prune -o \
24
+ -exec chmod 777 {} \;