Build decord from source with CUDA for GPU video decode
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions

- Build decord with -DUSE_CUDA=ON for true NVDEC hardware decode
- Use DLPack for zero-copy transfer from decord to CuPy
- Frames stay on GPU throughout: decode -> process -> encode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-04 01:50:14 +00:00
parent b7e3827fa2
commit 41adf058bd
2 changed files with 82 additions and 115 deletions

View File

@@ -26,9 +26,18 @@ RUN pip install --no-cache-dir -r requirements.txt
# Install GPU-specific dependencies (CuPy for CUDA 12.x)
RUN pip install --no-cache-dir cupy-cuda12x
# Install PyNvCodec for true GPU-native video decoding (NVDEC)
# Frames decode directly to GPU memory - zero CPU transfer
RUN pip install --no-cache-dir PyNvCodec
# Build decord from source with CUDA support for GPU-native video decoding
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --recursive https://github.com/dmlc/decord /tmp/decord && \
cd /tmp/decord && \
mkdir build && cd build && \
cmake .. -DUSE_CUDA=ON -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) && \
cd ../python && pip install . && \
rm -rf /tmp/decord
# Copy application
COPY . .