BinaryONe commited on
Commit
327e4b4
·
1 Parent(s): 40f2271

Initial Changes

Browse files
Files changed (2) hide show
  1. Dockerfile +17 -0
  2. entrypoint.sh +9 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:latest
2
+
3
+ RUN apt-get update && apt-get install -y curl
4
+
5
+ RUN curl https://ollama.ai/install.sh | sh
6
+
7
+ WORKDIR /.ollama
8
+
9
+ COPY entrypoint.sh /entrypoint.sh
10
+ RUN chmod +x /entrypoint.sh
11
+
12
+ ENTRYPOINT ["/entrypoint.sh"]
13
+ CMD ["ollama", "serve"]
14
+
15
+ ENV model=deepseek-r1:1.5b
16
+
17
+ EXPOSE 7860
entrypoint.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Pull model if not present
3
+ if ! ollama show "$model" >/dev/null 2>&1; then
4
+ echo "Pulling model $model..."
5
+ ollama pull "$model"
6
+ fi
7
+
8
+ # Serve binding to all interfaces; default Ollama host is 0.0.0.0:11434
9
+ ollama serve --port 7860