subhan971 commited on
Commit
7129fa7
·
verified ·
1 Parent(s): f43cd51

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -2,7 +2,6 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install dependencies
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends \
8
  curl \
@@ -10,20 +9,18 @@ RUN apt-get update && \
10
  ca-certificates && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
- # Install Ollama
14
  RUN curl -fsSL https://ollama.com/install.sh | sh
15
 
16
- # Install Python dependencies
 
 
 
 
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy application
21
  COPY . .
22
 
23
  EXPOSE 7860
24
 
25
- CMD bash -c '\
26
- ollama serve & \
27
- until ollama list >/dev/null 2>&1; do sleep 2; done && \
28
- ollama pull qwen3-vl:8b && \
29
- exec uvicorn app:app --host 0.0.0.0 --port 7860'
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && \
6
  apt-get install -y --no-install-recommends \
7
  curl \
 
9
  ca-certificates && \
10
  rm -rf /var/lib/apt/lists/*
11
 
 
12
  RUN curl -fsSL https://ollama.com/install.sh | sh
13
 
14
+ # Download the model at build time
15
+ RUN bash -c "ollama serve & \
16
+ until ollama list >/dev/null 2>&1; do sleep 2; done && \
17
+ ollama pull qwen3-vl:8b"
18
+
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
 
22
  COPY . .
23
 
24
  EXPOSE 7860
25
 
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]