joe4ai commited on
Commit
5a38905
·
verified ·
1 Parent(s): 8c8c8b8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
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
- # 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 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
+ # Pre-download the model but do not start Ollama API
41
+ RUN ollama pull llama3.2
42
 
43
+ # Start FastAPI application without running Ollama serve
44
  CMD uvicorn main:app --host 0.0.0.0 --port 7860