open-webui / Dockerfile
wwforonce's picture
fix storage permission error
2509e3a
raw
history blame
864 Bytes
FROM ghcr.io/open-webui/open-webui:main
# Install dependencies
RUN apt update && apt install -y \
gcc \
curl \
sudo \
git-lfs \
openssl \
&& rm -rf /var/lib/apt/lists/*
# Install Python packages
RUN pip install --no-cache-dir \
huggingface_hub \
datasets
# Set all cache directories to /tmp (writable)
ENV HF_HOME=/tmp/hf_cache
ENV HUGGINGFACE_HUB_CACHE=/tmp/hf_cache
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
ENV SENTENCE_TRANSFORMERS_HOME=/tmp/hf_cache
# Override Open WebUI cache directories
ENV DATA_DIR=/tmp/open-webui-data
ENV STATIC_DIR=/tmp/static
# Copy sync scripts
COPY sync_storage.py /app/sync_storage.py
COPY start_with_sync.sh /start.sh
# Make scripts executable
RUN chmod +x /app/sync_storage.py /start.sh
# Set working directory
WORKDIR /app
# Expose port
EXPOSE 8080
# Start with sync
ENTRYPOINT ["/start.sh"]