Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +4 -22
Dockerfile
CHANGED
|
@@ -1,28 +1,10 @@
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
|
| 3 |
-
# 安装必要的依赖
|
| 4 |
RUN apt-get update && apt-get install -y python3 python3-pip
|
| 5 |
-
|
| 6 |
-
# 安装 huggingface_hub 库
|
| 7 |
RUN pip3 install --no-cache-dir huggingface_hub
|
| 8 |
|
| 9 |
-
|
| 10 |
-
ENV HF_HOME="/app/data/huggingface"
|
| 11 |
-
ENV HUGGINGFACE_HUB_CACHE="/app/data/huggingface"
|
| 12 |
-
|
| 13 |
-
# 复制同步数据脚本
|
| 14 |
-
COPY sync_data.sh /app/
|
| 15 |
-
|
| 16 |
-
# 设置权限
|
| 17 |
-
RUN chmod -R 777 /app/data && \
|
| 18 |
-
chmod -R 777 /app/open_webui && \
|
| 19 |
-
chmod +x /app/sync_data.sh
|
| 20 |
-
|
| 21 |
-
# 修改启动脚本,确保同步脚本在启动时执行
|
| 22 |
-
RUN sed -i "1r /app/sync_data.sh" /app/start.sh
|
| 23 |
-
|
| 24 |
-
# 暴露端口(根据应用需求调整)
|
| 25 |
-
EXPOSE 3000
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
|
|
|
|
| 3 |
RUN apt-get update && apt-get install -y python3 python3-pip
|
|
|
|
|
|
|
| 4 |
RUN pip3 install --no-cache-dir huggingface_hub
|
| 5 |
|
| 6 |
+
COPY sync_data.sh sync_data.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
RUN chmod -R 777 ./data && \
|
| 9 |
+
chmod -R 777 ./open_webui && \
|
| 10 |
+
sed -i "1r sync_data.sh" ./start.sh
|