Spaces:
Sleeping
Sleeping
| # STEP 1: Grab the official Ollama engine | |
| FROM ollama/ollama:latest | |
| # STEP 2: Configure it for Hugging Face's network (Port 7860) | |
| ENV OLLAMA_HOST=0.0.0.0:7860 | |
| ENV OLLAMA_ORIGINS="*" | |
| # STEP 3: Fix permissions so HF doesn't block the download | |
| RUN mkdir -p /.ollama && chmod 777 /.ollama | |
| ENV OLLAMA_MODELS=/.ollama | |
| # STEP 4: The Bulletproof Pull with the Killswitch | |
| # We start the server, pull the model, and then KILL the background server so the build finishes instantly | |
| RUN ollama serve & sleep 10 && ollama pull dolphin-llama3 && pkill ollama | |