Spaces:
Running
Running
Create init.sh
Browse files
init.sh
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Start Ollama in the background.
|
4 |
+
/bin/ollama serve &
|
5 |
+
# Record Process ID.
|
6 |
+
pid=$!
|
7 |
+
|
8 |
+
# Pause for Ollama to start.
|
9 |
+
sleep 5
|
10 |
+
|
11 |
+
echo "🔴 Retrieve LLAMA3 model..."
|
12 |
+
/bin/ollama pull llama3
|
13 |
+
echo "🟢 Done!"
|
14 |
+
# Wait for Ollama process to finish.
|
15 |
+
wait $pid
|
16 |
+
# Start the Python application
|
17 |
+
echo "Starting Python application..."
|
18 |
+
python ./run.py
|
19 |
+
|
20 |
+
|