Neon-AI commited on
Commit
9b9c8a6
·
verified ·
1 Parent(s): 7814055

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.11-slim
3
+
4
+ # Avoid interactive prompts
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install system dependencies for OpenCV and FFmpeg
8
+ RUN apt-get update && apt-get install -y \
9
+ ffmpeg \
10
+ libgl1-mesa-glx \
11
+ libglib2.0-0 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Set working directory
15
+ WORKDIR /app
16
+
17
+ # Copy files
18
+ COPY requirements.txt .
19
+ COPY app.py .
20
+
21
+ # Install Python dependencies
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Expose port
25
+ EXPOSE 7860
26
+
27
+ # Run the FastAPI app
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]