rajendrakumarv tejovk311 commited on
Commit
937177c
·
verified ·
1 Parent(s): ab3e631

Create Dockerfile (#3)

Browse files

- Create Dockerfile (651c1839a0aa66320ba9fa8c1fe0b2566de061e0)


Co-authored-by: Kattamuri Tejo Vardhan <tejovk311@users.noreply.huggingface.co>

Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Install system dependencies for video processing
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ libsm6 \
7
+ libxext6 \
8
+ libxrender-dev \
9
+ libgl1-mesa-glx \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set working directory
13
+ WORKDIR /app
14
+
15
+ # Copy requirements file
16
+ COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy application code
22
+ COPY app.py .
23
+
24
+ # Create a directory for temporary files
25
+ RUN mkdir -p /tmp/video_processing && chmod 777 /tmp/video_processing
26
+
27
+ # Set environment variables
28
+ ENV PYTHONUNBUFFERED=1
29
+ ENV PORT=7860
30
+
31
+ # Expose port
32
+ EXPOSE 7860
33
+
34
+ # Command to run the application
35
+ CMD ["python", "app.py"]