RomRam1 commited on
Commit
73f314c
·
verified ·
1 Parent(s): e5ccfd5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile CHANGED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Avoid Python buffering issues
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ # Install system dependencies required by OpenCV
7
+ RUN apt-get update && apt-get install -y \
8
+ libglib2.0-0 \
9
+ libsm6 \
10
+ libxext6 \
11
+ libxrender1 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Set working directory
15
+ WORKDIR /app
16
+
17
+ # Copy requirements first (Docker layer caching)
18
+ COPY requirements.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy application code and model files
24
+ COPY . .
25
+
26
+ # Hugging Face Spaces expects port 7860
27
+ EXPOSE 7860
28
+
29
+ # Start the Flask app
30
+ CMD ["python", "app.py"]