File size: 547 Bytes
f4c14da
 
 
 
 
 
 
 
 
 
 
b5eb63d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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