Abeshith commited on
Commit
475fcc7
·
1 Parent(s): 26adb1b

Fix Dockerfile for HF Spaces - use requirements.txt, port 7860, uvicorn

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -2,16 +2,14 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- COPY pyproject.toml ./
6
- COPY requirements.txt* ./
7
 
8
- RUN pip install --no-cache-dir uv && \
9
- uv pip install --system --no-cache -r pyproject.toml
10
 
11
  COPY . .
12
 
13
- EXPOSE 8000
14
 
15
  ENV PYTHONUNBUFFERED=1
16
 
17
- CMD ["python", "app.py"]
 
2
 
3
  WORKDIR /app
4
 
5
+ COPY requirements.txt ./
 
6
 
7
+ RUN pip install --no-cache-dir -r requirements.txt
 
8
 
9
  COPY . .
10
 
11
+ EXPOSE 7860
12
 
13
  ENV PYTHONUNBUFFERED=1
14
 
15
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]