ffreemt commited on
Commit ·
94c38c3
1
Parent(s): 82e73f9
ollama port 11434 + nginx
Browse files- nginx.conf.template +1 -1
- start.sh +3 -5
nginx.conf.template
CHANGED
|
@@ -9,7 +9,7 @@ http {
|
|
| 9 |
return 401 "Unauthorized: Invalid API Key\n";
|
| 10 |
}
|
| 11 |
|
| 12 |
-
proxy_pass http://localhost:
|
| 13 |
proxy_set_header Host $host;
|
| 14 |
proxy_set_header X-Real-IP $remote_addr;
|
| 15 |
}
|
|
|
|
| 9 |
return 401 "Unauthorized: Invalid API Key\n";
|
| 10 |
}
|
| 11 |
|
| 12 |
+
proxy_pass http://localhost:11434;
|
| 13 |
proxy_set_header Host $host;
|
| 14 |
proxy_set_header X-Real-IP $remote_addr;
|
| 15 |
}
|
start.sh
CHANGED
|
@@ -1,13 +1,11 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start Ollama server in the background
|
| 4 |
-
# We bind it to port
|
| 5 |
-
OLLAMA_HOST=0.0.0.0:
|
| 6 |
-
|
| 7 |
-
ollama serve &
|
| 8 |
|
| 9 |
# Wait for the server to be ready
|
| 10 |
-
until curl -s localhost:
|
| 11 |
echo "Waiting for Ollama server..."
|
| 12 |
sleep 2
|
| 13 |
done
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start Ollama server in the background
|
| 4 |
+
# We bind it to port 11434 as expected by HF Spaces
|
| 5 |
+
OLLAMA_HOST=0.0.0.0:11434 ollama serve &
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Wait for the server to be ready
|
| 8 |
+
until curl -s localhost:11434/api/tags > /dev/null; do
|
| 9 |
echo "Waiting for Ollama server..."
|
| 10 |
sleep 2
|
| 11 |
done
|