Spaces:
Sleeping

PERDYPTO commited on
Commit
c9d654b
·
verified ·
1 Parent(s): 7cb4c8c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,12 +1,13 @@
1
  FROM python:3.12-slim
2
-
3
  WORKDIR /app
4
 
5
- # Install huggingface_hub
6
- RUN pip install --no-cache-dir huggingface_hub
 
 
 
7
 
8
- # Copy the script
9
- COPY app.py .
10
 
11
- # Run the script when the container starts
12
- CMD ["python", "app.py"]
 
1
  FROM python:3.12-slim
 
2
  WORKDIR /app
3
 
4
+ # Install git-lfs (sometimes needed for large HF files)
5
+ RUN apt-get update && apt-get install -y --no-install-recommends git git-lfs && rm -rf /var/lib/apt/lists/*
6
+
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ COPY . .
 
11
 
12
+ # Run unbuffered so logs show up immediately in HF
13
+ CMD ["python", "-u", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]