-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.video
43 lines (34 loc) · 1.04 KB
/
Dockerfile.video
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Use NVIDIA CUDA base image for GPU acceleration
FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
# Prevent interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3.10 \
python3-pip \
ffmpeg \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Install additional video processing dependencies
RUN pip3 install --no-cache-dir \
opencv-python-headless \
ffmpeg-python \
moviepy
# Copy application code
COPY utils/video_processor.py utils/
COPY core/content/ core/content/
# Create directories for data
RUN mkdir -p /data/lectures/processed
# Set environment variables
ENV PYTHONPATH=/app
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
# Run video processor
ENTRYPOINT ["python3", "-m", "utils.video_processor"]