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