chore(video-studio): 🔧 Update Docker configuration for video processing pipeline with new service definitions and build optimizations
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
c2e8c5fcbd
commit
e214f4518a
2 changed files with 1 additions and 79 deletions
|
|
@ -18,34 +18,7 @@ services:
|
|||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
processing-service:
|
||||
build:
|
||||
context: ./processing-service
|
||||
dockerfile: Dockerfile
|
||||
container_name: lilith-video-studio-processing
|
||||
environment:
|
||||
REDIS_URL: ${REDIS_URL:-redis://host.docker.internal:6379/5}
|
||||
USE_GPU: ${USE_GPU:-true}
|
||||
PYTHONUNBUFFERED: "1"
|
||||
ports:
|
||||
- "8110:8110"
|
||||
volumes:
|
||||
# Mount shared media storage so the service can read/write video files
|
||||
- ${MEDIA_STORAGE_PATH:-/tmp/lilith-media}:/media
|
||||
runtime: nvidia # Remove if GPU not available; set USE_GPU=false
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8110/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s # Allow time for InsightFace model load
|
||||
# processing-service has been migrated to @applications/@imajin/services/imajin-video (port 8010)
|
||||
|
||||
volumes:
|
||||
video_studio_postgres_data:
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
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