Download Dockerfile from mfoud444/open: direct link, hf CLI and curl.
- Browser
- Download file 777 Bytes
-
https://huggingface.co/spaces/mfoud444/open/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mfoud444/open/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mfoud444/open/resolve/main/Dockerfile
777 Bytes
| FROM ghcr.io/open-webui/open-webui:main | |
| # Create required directories first | |
| RUN mkdir -p /app/backend | |
| # Set environment variables | |
| ENV PORT=7860 | |
| ENV DISABLE_GIT=true # Disables Git repository initialization | |
| ENV OLLAMA_API_BASE_URL=http://host.docker.internal:11434 | |
| ENV WEBUI_SECRET_KEY=your-secure-key-here-change-me | |
| # Create data directory and set permissions | |
| RUN mkdir -p /app/backend/data && \ | |
| chown -R node:node /app/backend | |
| # Switch to non-root user | |
| USER node | |
| # Expose port 7860 for Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Persist data volume | |
| VOLUME /app/backend/data | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s \ | |
| CMD curl -f http://localhost:7860 || exit 1 | |
| # Start command | |
| CMD ["sh", "-c", "python -m uvicorn main:app --host 0.0.0.0 --port ${PORT}"] |