Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
@@ -11,21 +11,25 @@ RUN apt-get update && apt-get install -y \
|
|
11 |
libglib2.0-0 \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# β
|
15 |
-
|
16 |
|
17 |
-
# β
Install
|
18 |
-
RUN pip install --no-cache-dir -
|
19 |
|
20 |
-
# β
Manually install MoviePy
|
21 |
-
RUN pip install --no-cache-dir moviepy imageio[ffmpeg]
|
22 |
|
23 |
-
# β
Ensure
|
24 |
ENV IMAGEIO_FFMPEG_EXE=/usr/bin/ffmpeg
|
25 |
|
|
|
|
|
|
|
26 |
# β
Expose required ports (FastAPI & Streamlit)
|
27 |
EXPOSE 7860 8501
|
28 |
|
29 |
# β
Run both FastAPI and Streamlit
|
30 |
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
|
31 |
|
|
|
|
11 |
libglib2.0-0 \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
+
# β
Upgrade pip
|
15 |
+
RUN pip install --upgrade pip
|
16 |
|
17 |
+
# β
Install core dependencies first
|
18 |
+
RUN pip install --no-cache-dir fastapi uvicorn torch transformers spacy pdfplumber sentence-transformers librosa soundfile requests numpy scipy Pillow opencv-python matplotlib openai-whisper streamlit
|
19 |
|
20 |
+
# β
Manually install MoviePy separately to ensure it installs correctly
|
21 |
+
RUN pip install --no-cache-dir moviepy imageio[ffmpeg] --break-system-packages
|
22 |
|
23 |
+
# β
Ensure moviepy has access to FFmpeg
|
24 |
ENV IMAGEIO_FFMPEG_EXE=/usr/bin/ffmpeg
|
25 |
|
26 |
+
# β
Copy project files
|
27 |
+
COPY . .
|
28 |
+
|
29 |
# β
Expose required ports (FastAPI & Streamlit)
|
30 |
EXPOSE 7860 8501
|
31 |
|
32 |
# β
Run both FastAPI and Streamlit
|
33 |
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
|
34 |
|
35 |
+
|