Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +11 -12
entrypoint.sh
CHANGED
|
@@ -1,21 +1,20 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
#
|
| 4 |
echo "Starting server"
|
| 5 |
ollama serve &
|
| 6 |
sleep 1
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
sleep 5
|
| 14 |
-
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
# Keep the script running to prevent the container from exiting
|
| 20 |
-
# Adjust the command below as needed based on your application's behavior
|
| 21 |
wait
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Starting server
|
| 4 |
echo "Starting server"
|
| 5 |
ollama serve &
|
| 6 |
sleep 1
|
| 7 |
|
| 8 |
+
# Splitting the models by comma and pulling each
|
| 9 |
+
IFS=',' read -ra MODELS <<< "$model"
|
| 10 |
+
for m in "${MODELS[@]}"; do
|
| 11 |
+
echo "Pulling $m"
|
| 12 |
+
ollama pull "$m"
|
| 13 |
+
# sleep 5
|
| 14 |
+
# echo "Running $m"
|
| 15 |
+
# ollama run "$m"
|
| 16 |
+
# No need to sleep here unless you want to give some delay between each pull for some reason
|
| 17 |
+
done
|
| 18 |
|
| 19 |
# Keep the script running to prevent the container from exiting
|
|
|
|
| 20 |
wait
|