Spaces:
Running
Running
| # 1. Base Image: Open WebUI | |
| FROM ghcr.io/open-webui/open-webui:main | |
| # 2. Environment Variables | |
| ENV PORT=7860 | |
| ENV OLLAMA_BASE_URL=http://localhost:11434 | |
| # Save Ollama models to the data folder so they persist (if you use HF Storage) | |
| ENV OLLAMA_MODELS=/app/backend/data/ollama | |
| # 3. Install Ollama (requires root) | |
| USER root | |
| RUN curl -fsSL https://ollama.com/install.sh | sh | |
| # 4. Single-line startup command | |
| # Starts Ollama in background -> Waits 10s -> Starts WebUI | |
| CMD bash -c "ollama serve & sleep 10 && /app/backend/start.sh" |