batmanLovesAI commited on
Commit
eacabe3
·
1 Parent(s): 7effb71

fix: ports

Browse files
Files changed (2) hide show
  1. Dockerfile +0 -2
  2. start.sh +10 -4
Dockerfile CHANGED
@@ -1,7 +1,5 @@
1
  FROM ollama/ollama
2
 
3
- RUN apt-get update && apt-get install -y socat
4
-
5
  COPY start.sh /start.sh
6
 
7
  RUN chmod +x /start.sh
 
1
  FROM ollama/ollama
2
 
 
 
3
  COPY start.sh /start.sh
4
 
5
  RUN chmod +x /start.sh
start.sh CHANGED
@@ -1,10 +1,16 @@
1
- #!/bin/bash
2
 
 
 
 
 
3
  ollama serve &
4
 
5
- sleep 15
 
6
 
 
7
  ollama pull embeddinggemma
8
 
9
- socat TCP-LISTEN:7860,fork
10
- TCP:localhost:11434
 
1
+ #!/bin/sh
2
 
3
+ # Tell Ollama to listen on port 7860
4
+ export OLLAMA_HOST=0.0.0.0:7860
5
+
6
+ # Start server
7
  ollama serve &
8
 
9
+ # Wait until server is ready
10
+ sleep 10
11
 
12
+ # Pull model
13
  ollama pull embeddinggemma
14
 
15
+ # Keep container alive
16
+ wait