Spaces:
Sleeping
Sleeping
Gaurav vashistha
commited on
Commit
·
124ace2
1
Parent(s):
5e07b31
Fix Dockerfile: Add ffmpeg dependency
Browse files- Dockerfile +21 -2
Dockerfile
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
|
|
|
|
|
|
| 2 |
WORKDIR /app
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
|
|
|
| 6 |
COPY requirements.txt .
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 8 |
COPY . .
|
|
|
|
|
|
|
| 9 |
RUN mkdir -p outputs && chmod 777 outputs
|
|
|
|
|
|
|
| 10 |
EXPOSE 7860
|
| 11 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python runtime as a parent image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# 1. INSTALL SYSTEM DEPENDENCIES (Critical for Video Processing)
|
| 8 |
+
# - ffmpeg: Required for stitching
|
| 9 |
+
# - libgl1/libglib: Required for OpenCV and graphical operations
|
| 10 |
+
RUN apt-get update && apt-get install -y \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libgl1-mesa-glx \
|
| 13 |
+
libglib2.0-0 \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# 2. Install Python Dependencies (Cached)
|
| 17 |
COPY requirements.txt .
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
+
|
| 20 |
+
# 3. Copy Application Code
|
| 21 |
COPY . .
|
| 22 |
+
|
| 23 |
+
# 4. Create writable directory for outputs
|
| 24 |
RUN mkdir -p outputs && chmod 777 outputs
|
| 25 |
+
|
| 26 |
+
# 5. Expose Port
|
| 27 |
EXPOSE 7860
|
| 28 |
+
|
| 29 |
+
# 6. Start Server
|
| 30 |
+
CMD ["python", "server.py"]
|