Spaces:
Runtime error
Runtime error
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
# Start Ollama in the background
|
| 3 |
-
ollama serve &
|
| 4 |
|
| 5 |
# Wait for Ollama to be ready (check if port 11434 is open)
|
| 6 |
echo "Waiting for Ollama to start..."
|
| 7 |
-
timeout 30s bash -c "until curl -s http://localhost:11434 > /dev/null; do sleep 1; done"
|
| 8 |
-
if [ $? -eq 0 ]; then
|
| 9 |
-
echo "Ollama is running."
|
| 10 |
-
else
|
| 11 |
-
echo "Failed to start Ollama within 30 seconds."
|
| 12 |
-
exit 1
|
| 13 |
-
fi
|
| 14 |
|
| 15 |
# Pull the model (llama3.2)
|
| 16 |
echo "Pulling llama3.2 model..."
|
| 17 |
-
ollama pull llama3.2:1b
|
| 18 |
|
| 19 |
# Start Streamlit
|
| 20 |
echo "Starting Streamlit..."
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
# Start Ollama in the background
|
| 3 |
+
# ollama serve &
|
| 4 |
|
| 5 |
# Wait for Ollama to be ready (check if port 11434 is open)
|
| 6 |
echo "Waiting for Ollama to start..."
|
| 7 |
+
# timeout 30s bash -c "until curl -s http://localhost:11434 > /dev/null; do sleep 1; done"
|
| 8 |
+
# if [ $? -eq 0 ]; then
|
| 9 |
+
# echo "Ollama is running."
|
| 10 |
+
#else
|
| 11 |
+
# echo "Failed to start Ollama within 30 seconds."
|
| 12 |
+
# exit 1
|
| 13 |
+
#fi
|
| 14 |
|
| 15 |
# Pull the model (llama3.2)
|
| 16 |
echo "Pulling llama3.2 model..."
|
| 17 |
+
#ollama pull llama3.2:1b
|
| 18 |
|
| 19 |
# Start Streamlit
|
| 20 |
echo "Starting Streamlit..."
|