Shees7 commited on
Commit
329dfae
·
verified ·
1 Parent(s): 025e2b9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set work directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies
12
+ RUN apt-get update && apt-get install -y \
13
+ ffmpeg \
14
+ libsm6 \
15
+ libxext6 \
16
+ libgl1-mesa-glx \
17
+ libglib2.0-0 \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # Install pip requirements
21
+ COPY requirements.txt .
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy project files
25
+ COPY . .
26
+
27
+ # Expose port for FastAPI
28
+ EXPOSE 7860
29
+
30
+ # Start FastAPI app using uvicorn
31
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]