subhrajit-mohanty commited on
Commit
01f0289
·
verified ·
1 Parent(s): 4b02465

Create entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +17 -0
entrypoint.sh ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start Ollama server in the background
4
+ ollama serve --port 7860 &
5
+
6
+ # Wait for the server to be ready
7
+ while ! nc -z localhost 7860; do
8
+ echo "Waiting for Ollama server to start..."
9
+ sleep 1
10
+ done
11
+
12
+ # Pull the model
13
+ echo "Pulling the model..."
14
+ ollama pull steamdj/llama3.1-cpu-only
15
+
16
+ # Keep the container running
17
+ wait