Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -37,8 +37,8 @@ COPY --chown=user . $HOME/app
|
|
37 |
# Ensure Ollama has a cache directory
|
38 |
RUN mkdir -p /tmp/ollama_cache
|
39 |
|
40 |
-
#
|
41 |
-
RUN ollama pull llama3.2
|
42 |
|
43 |
-
# Start
|
44 |
-
CMD uvicorn main:app --host 0.0.0.0 --port 7860
|
|
|
37 |
# Ensure Ollama has a cache directory
|
38 |
RUN mkdir -p /tmp/ollama_cache
|
39 |
|
40 |
+
# Start Ollama in the background and pull the model
|
41 |
+
RUN ollama serve > /tmp/ollama.log 2>&1 & sleep 5 && ollama pull llama3.2
|
42 |
|
43 |
+
# Start Ollama before running FastAPI
|
44 |
+
CMD ollama serve > /tmp/ollama.log 2>&1 & sleep 5 && uvicorn main:app --host 0.0.0.0 --port 7860
|