redfernstech commited on
Commit
ead3a98
·
verified ·
1 Parent(s): 47aa8e5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -5
Dockerfile CHANGED
@@ -1,12 +1,8 @@
1
- # Use official Python base image
2
  FROM python:3.12.5
3
 
4
  # Install Ollama as root
5
  RUN curl -fsSL https://ollama.com/install.sh | sh
6
 
7
- # Start Ollama in the background and pull the model
8
- RUN ollama serve & sleep 5 && ollama pull llama3
9
-
10
  # Create a new user and switch to it
11
  RUN useradd -m -u 1000 user
12
  USER user
@@ -26,4 +22,4 @@ COPY --chown=user . /app
26
  EXPOSE 7860
27
 
28
  # Start Ollama and FastAPI together
29
- CMD ["sh", "-c", "ollama serve & uvicorn app:app --host 0.0.0.0 --port 7860"]
 
 
1
  FROM python:3.12.5
2
 
3
  # Install Ollama as root
4
  RUN curl -fsSL https://ollama.com/install.sh | sh
5
 
 
 
 
6
  # Create a new user and switch to it
7
  RUN useradd -m -u 1000 user
8
  USER user
 
22
  EXPOSE 7860
23
 
24
  # Start Ollama and FastAPI together
25
+ CMD ["sh", "-c", "ollama serve & ollama pull llama3:8b && uvicorn app:app --host 0.0.0.0 --port 7860"]