WebashalarForML commited on
Commit
e65a8eb
·
verified ·
1 Parent(s): d306d41

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a Python base image (can switch to HF CPU/GPU base later if needed)
2
+ FROM python:3.9-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ PORT=7860
8
+
9
+ # Create app directory
10
+ WORKDIR /app
11
+
12
+ # Install system dependencies
13
+ RUN apt-get update && apt-get install -y --no-install-recommends \
14
+ ffmpeg \
15
+ git \
16
+ curl \
17
+ libgl1-mesa-glx \
18
+ libglib2.0-0 \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # Copy requirements and install Python dependencies
22
+ COPY requirements.txt .
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy application files
26
+ COPY . .
27
+
28
+ # Expose port used by Hugging Face inference endpoint
29
+ EXPOSE 7860
30
+
31
+ # Default command to run Flask app
32
+ CMD ["python", "app.py"]