Athspi commited on
Commit
8bb0c3a
·
verified ·
1 Parent(s): a54ed9d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -2
Dockerfile CHANGED
@@ -1,11 +1,27 @@
1
- FROM python:3.10
 
2
 
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY app.py .
9
 
 
 
 
 
 
10
  EXPOSE 7860
11
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
1
+ # Dockerfile
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install ffmpeg (needed by yt-dlp)
8
+ RUN apt-get update && \
9
+ apt-get install -y ffmpeg && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy requirements
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Copy app code
17
  COPY app.py .
18
 
19
+ # Create downloads dir
20
+ ENV DOWNLOAD_FOLDER=/tmp/downloads
21
+ RUN mkdir -p $DOWNLOAD_FOLDER
22
+
23
+ # Expose port (HF will override, but good practice)
24
  EXPOSE 7860
25
+
26
+ # Run with gunicorn
27
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]