MalikSahib1 commited on
Commit
99219be
·
verified ·
1 Parent(s): fd98893

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python 3.9 base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /code
6
+
7
+ # Install system dependencies - ffmpeg is crucial for yt-dlp
8
+ RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Copy requirements file
11
+ COPY ./requirements.txt /code/requirements.txt
12
+
13
+ # Install Python packages
14
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
+
16
+ # Copy all application code
17
+ COPY . /code/
18
+
19
+ # Expose the port Hugging Face uses
20
+ EXPOSE 7860
21
+
22
+ # Command to run the FastAPI server using Uvicorn
23
+ # The app:app refers to the 'app' object in the 'app.py' file
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]