subhrajit-mohanty
commited on
Create entrypoint.sh
Browse files- entrypoint.sh +18 -0
entrypoint.sh
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Start Ollama server in the background
|
4 |
+
ollama serve &
|
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 nomic-embed-text
|
15 |
+
ollama pull all-minilm
|
16 |
+
|
17 |
+
# Keep the container running
|
18 |
+
wait
|