Open-WebUI / Dockerfile
HuggingFace0920's picture
Update Dockerfile
9728c75 verified
raw
history blame
725 Bytes
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"]