fugthchat commited on
Commit
60b07c5
·
verified ·
1 Parent(s): 6582790

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Start with a lightweight Python image
2
+ FROM python:3.9-slim
3
+
4
+ # Install FFmpeg (Required for MoviePy/Video processing)
5
+ RUN apt-get update && \
6
+ apt-get install -y ffmpeg && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ # Set working directory
10
+ WORKDIR /app
11
+
12
+ # Install Python dependencies
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Create necessary directories and set permissions so the app can write to them
17
+ RUN mkdir -p uploads user_files && \
18
+ chmod 777 uploads user_files
19
+
20
+ # Copy the rest of the app code
21
+ COPY . .
22
+
23
+ # Expose the standard Hugging Face port
24
+ EXPOSE 7860
25
+
26
+ # Run the app with Gunicorn for stability
27
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--timeout", "300"]