chore(video-studio): 🔧 Update Docker container configuration for video processing service with new base image and dependencies
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
542ac4c3cd
commit
45cecf791f
1 changed files with 51 additions and 0 deletions
51
features/video-studio/processing-service/Dockerfile
Normal file
51
features/video-studio/processing-service/Dockerfile
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
FROM python:3.12-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
libsm6 \
|
||||
libxext6 \
|
||||
libxrender-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Generate the mask asset PNG at build time so it's baked into the image
|
||||
COPY assets/masks/generate_mask_asset.py assets/masks/gimp-mask.meta.json /app/assets/masks/
|
||||
RUN python /app/assets/masks/generate_mask_asset.py
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
libsm6 \
|
||||
libxext6 \
|
||||
libxrender-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy installed packages from builder
|
||||
COPY --from=builder /usr/local/lib/python3.12 /usr/local/lib/python3.12
|
||||
COPY --from=builder /usr/local/bin /usr/local/bin
|
||||
|
||||
# Copy source
|
||||
COPY src/ ./src/
|
||||
COPY assets/ ./assets/
|
||||
|
||||
# Copy generated mask PNG from builder
|
||||
COPY --from=builder /app/assets/masks/gimp-mask.png ./assets/masks/gimp-mask.png
|
||||
|
||||
ENV PYTHONPATH=/app/src
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
EXPOSE 8110
|
||||
|
||||
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8110", "--workers", "1"]
|
||||
Loading…
Add table
Reference in a new issue