Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cv/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ RUN --mount=type=cache,target=/root/.cache/pip \
&& pip install -r /tmp/req.txt \
&& rm /tmp/req.txt

# The nvcr.io base ships its own OpenCV (pip package name `opencv`, built
# WITHOUT FFmpeg) which shadows the opencv-python wheel from req.txt — the
# imported cv2 ends up FFMPEG: NO, so cv2.VideoCapture can't open RTSP and
# every camera open fails instantly. Drop the base build and force-reinstall
# the pip wheel (FFMPEG: YES), then assert the backend is present so this
# regression cannot return silently in a future base bump.
RUN --mount=type=cache,target=/root/.cache/pip \
pip uninstall -y opencv opencv-python opencv-python-headless || true \
&& pip install --force-reinstall --no-deps "opencv-python>=4.10" \
&& python3 -c "import cv2; bi=cv2.getBuildInformation(); assert any('FFMPEG' in l and l.strip().endswith('YES') for l in bi.splitlines()), 'OpenCV FFMPEG backend missing — RTSP capture would fail'; print('cv2', cv2.__version__, 'FFMPEG: YES')"

# Diagnostic: print the compiled arch list so a future regression is
# visible in build logs. With the nvcr.io base on 25.04, expect sm_70
# through sm_120 (Volta through Blackwell). Pascal (sm_61) is not
Expand Down
Loading