AbdulWahab14 commited on
Commit
d074992
·
verified ·
1 Parent(s): 292969c

Update DockerFile

Browse files
Files changed (1) hide show
  1. DockerFile +7 -1
DockerFile CHANGED
@@ -2,12 +2,18 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  COPY . .
9
 
10
- # Download embedding model at build time
11
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
12
 
13
  EXPOSE 7860
 
2
 
3
  WORKDIR /app
4
 
5
+ # System deps
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ gcc \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install requirements (NO gradio auto-install from HF)
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  COPY . .
15
 
16
+ # Pre-download embedding model
17
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
18
 
19
  EXPOSE 7860