Update entrypoint.sh
Browse files- entrypoint.sh +9 -8
entrypoint.sh
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
-
# Ensure
|
4 |
-
export OLLAMA_HOME=/ollama
|
5 |
|
6 |
# Start the Ollama server in the background
|
7 |
ollama serve &
|
8 |
|
9 |
-
# Wait
|
10 |
-
sleep
|
11 |
|
12 |
-
# (Optional) Preload
|
13 |
-
#
|
14 |
ollama run hf.co/abanm/Dubs-Q8_0-GGUF &
|
15 |
|
16 |
-
#
|
17 |
cd /app
|
18 |
|
19 |
-
# Start the FastAPI app
|
20 |
uvicorn app:app --host 0.0.0.0 --port 7860
|
21 |
|
|
|
|
1 |
#!/bin/sh
|
2 |
|
3 |
+
# Ensure OLLAMA_HOME is set
|
4 |
+
export OLLAMA_HOME=/home/appuser/.ollama
|
5 |
|
6 |
# Start the Ollama server in the background
|
7 |
ollama serve &
|
8 |
|
9 |
+
# Wait for Ollama to initialize
|
10 |
+
sleep 10
|
11 |
|
12 |
+
# (Optional) Preload the Hugging Face model
|
13 |
+
# Uncomment the line below to preload a specific model
|
14 |
ollama run hf.co/abanm/Dubs-Q8_0-GGUF &
|
15 |
|
16 |
+
# Navigate to the application directory
|
17 |
cd /app
|
18 |
|
19 |
+
# Start the FastAPI app using Uvicorn
|
20 |
uvicorn app:app --host 0.0.0.0 --port 7860
|
21 |
|
22 |
+
|