nk233 commited on
Commit
669b4eb
·
verified ·
1 Parent(s): 2644a57

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -1,11 +1,18 @@
1
  FROM python:3.11-slim
2
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
  COPY requirements.txt .
6
- RUN pip install -r requirements.txt
 
7
 
8
  COPY app.py .
9
 
10
  ENV PORT=7860
 
11
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.11-slim
2
 
3
+ # System deps needed by torch / sentence-transformers / faiss
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ libgomp1 libstdc++6 git-lfs \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
  WORKDIR /app
9
 
10
  COPY requirements.txt .
11
+ # Avoid cached wheels that may mismatch; ensure CPU wheels
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  COPY app.py .
15
 
16
  ENV PORT=7860
17
+ EXPOSE 7860
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]