tejash300 commited on
Commit
8bd6f23
Β·
verified Β·
1 Parent(s): 8562967

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # βœ… Use Python 3.9 as the base image
2
+ FROM python:3.9
3
+
4
+ # βœ… Set the working directory
5
+ WORKDIR /app
6
+
7
+ # βœ… Install system dependencies
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
+ # βœ… Copy project files
15
+ COPY . .
16
+
17
+ # βœ… Install Python dependencies manually
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+ RUN pip install moviepy imageio[ffmpeg] # βœ… Manually install moviepy & dependencies
20
+
21
+ # βœ… Ensure MoviePy has access to FFmpeg
22
+ ENV IMAGEIO_FFMPEG_EXE=/usr/bin/ffmpeg
23
+
24
+ # βœ… Expose required ports (FastAPI & Streamlit)
25
+ EXPOSE 7860 8501
26
+
27
+ # βœ… Run both FastAPI and Streamlit
28
+ CMD uvicorn app:app --host 0.0.0.0 --port 7860 & streamlit run app_ui.py --server.port 8501 --server.address 0.0.0.0