Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +21 -25
Dockerfile
CHANGED
|
@@ -1,28 +1,24 @@
|
|
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
| 9 |
-
RUN
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 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 {} \;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|