CoolFace
Apppublic

kaushikpaul/Open-WebUI-Surplus

sourceHugging Faceupdated 19d agoView on Hugging Face
0likes
Dockerfile33 linesDownload Raw Back to root
1# syntax=docker/dockerfile:12# Do not compile the Svelte app in this image. Hugging Face cpu-basic builders3# OOM during Vite (exit 137). Put a production build in main/frontend-dist first4# (`python3 main/scripts/deploy_space.py` does that locally).5FROM python:3.11.13-slim-bookworm6ENV PYTHONUNBUFFERED=1 ENV=prod PORT=7860 HOST=0.0.0.0 DOCKER=true \7    DATA_DIR=/app/backend/data HF_HOME=/app/backend/data/cache/huggingface \8    SENTENCE_TRANSFORMERS_HOME=/app/backend/data/cache/embedding \9    TIKTOKEN_CACHE_DIR=/app/backend/data/cache/tiktoken \10    SCARF_NO_ANALYTICS=true DO_NOT_TRACK=true ANONYMIZED_TELEMETRY=false \11    ENABLE_OLLAMA_API=false RAG_EMBEDDING_MODEL_AUTO_UPDATE=false \12    WHISPER_MODEL_AUTO_UPDATE=false UV_LINK_MODE=copy \13    UV_CONCURRENT_DOWNLOADS=1 UV_CONCURRENT_INSTALLS=114RUN apt-get update && apt-get install -y --no-install-recommends \15    build-essential libmariadb-dev ffmpeg libsm6 libxext6 curl ca-certificates pandoc git \16    && rm -rf /var/lib/apt/lists/* \17    && useradd --uid 1000 --create-home app18WORKDIR /app/backend19COPY main/upstream/backend/requirements.txt ./requirements.txt20RUN pip install --no-cache-dir uv==0.8.17 \21    && uv pip install --system 'torch==2.9.1' 'torchvision==0.24.1' 'torchaudio==2.9.1' --index-url https://download.pytorch.org/whl/cpu \22    && uv pip install --system -r requirements.txt23COPY --chown=1000:1000 main/upstream/backend/ ./24COPY --chown=1000:1000 main/frontend-dist /app/build25COPY --chown=1000:1000 main/upstream/package.json main/upstream/CHANGELOG.md /app/26COPY --chown=1000:1000 main/scripts/entrypoint.sh main/scripts/reset_owner_password.py /app/scripts/27RUN test -f /app/build/index.html \28    && mkdir -p /app/backend/data && chown -R 1000:1000 /app29USER 1000:100030EXPOSE 786031HEALTHCHECK --interval=30s --start-period=180s CMD curl --fail --silent http://127.0.0.1:7860/health || exit 132ENTRYPOINT ["/bin/sh", "/app/scripts/entrypoint.sh"]33