rajux75 commited on
Commit
80fb325
·
verified ·
1 Parent(s): 430f11f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile (Place in the root of your repo)
2
+ FROM python:3.10-slim # Or a version compatible with your dependencies
3
+
4
+ WORKDIR /code
5
+
6
+ # Install system dependencies (like ffmpeg for imageio's mp4 writing)
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ ffmpeg \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ COPY requirements.txt requirements.txt
12
+ RUN pip install --no-cache-dir --upgrade pip && \
13
+ pip install --no-cache-dir -r requirements.txt
14
+
15
+ COPY . /code
16
+
17
+ # Expose the port FastAPI will run on (default 8000 for uvicorn, 7860 common for HF)
18
+ EXPOSE 7860
19
+
20
+ # Command to run the application using uvicorn
21
+ # Use --host 0.0.0.0 to make it accessible from outside the container
22
+ # Use --port 7860 as expected by HF Spaces default proxying
23
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]