triflix commited on
Commit
476534a
·
verified ·
1 Parent(s): f1ea8d7

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ollama/ollama:0.3.12
2
+
3
+ USER root
4
+
5
+ # Install curl for health checks
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends curl && \
8
+ rm -rf /var/lib/apt/lists/*
9
+
10
+ # Force Ollama to bind on 0.0.0.0:7860
11
+ ENV OLLAMA_HOST=0.0.0.0:7860
12
+ # Store models inside the container
13
+ ENV OLLAMA_MODELS=/root/.ollama/models
14
+ # Disable GPU (free tier = CPU only)
15
+ ENV OLLAMA_NUM_GPU=0
16
+ # Keep model loaded in memory permanently
17
+ ENV OLLAMA_KEEP_ALIVE=-1
18
+
19
+ EXPOSE 7860
20
+
21
+ COPY entrypoint.sh /entrypoint.sh
22
+ RUN chmod +x /entrypoint.sh
23
+
24
+ ENTRYPOINT ["/entrypoint.sh"]