Reproducible builds: lock files, pinned images, slim CUDA image - #52
Merged
Merged
Conversation
- Hash-locked requirements.lock / requirements-cuda.lock (uv), installed with --require-hashes on a digest-pinned python:3.11.16-slim - The CUDA image uses the same base plus CuPy and the CUDA libraries as pip wheels instead of nvidia/cuda devel: 12.7 GB -> 3.5 GB - opencv-python-headless everywhere (CPU image 1.13 GB -> 0.78 GB) - A fixed non-root user, so docker build needs no UID build args - Actions pinned by SHA; Dependabot for actions and the base image - CONTRIBUTING documents how to regenerate the locks Closes #41.
joeljose
force-pushed
the
build/reproducible
branch
from
September 29, 2026 06:08
5ec8060 to
a03e835
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #41.
Changes
requirements.lockandrequirements-cuda.lockare hash-locked and generated withuv pip compile, as described in CONTRIBUTING. The images install them with--require-hashes.requirements*.txtandpyproject.tomlkeep the ranges, and I raised the lower bounds to installable versions (numpy >= 1.23, scipy >= 1.9).python:3.11.16-slim, pinned by digest, for both images.nvidia-*-cu12pip wheels, put onLD_LIBRARY_PATH. There is no morenvidia/cuda:*-develbase, and the Python is now the same as the CPU image (it was 3.10). The host only needs the driver and the Container Toolkit.pip install .[cuda]now includes the same wheels.opencv-python-headlesseverywhere, so thelibgl1/libglib2.0-0apt layer is gone.docker build .needs no build args and the images aren't tied to whoever built them. The README,test.shand CI use--user "$(id -u):$(id -g)"for bind mounts.Acceptance criteria
docker build .anddocker build -f Dockerfile.cuda .with no build argsVerification
./test.sh: 97 passed, 1 skipped../test.sh gpuon an RTX 4050 with the new slim image: 7 passed.--gpurun on face.mp4 (VRAM check and save) works, and output files are owned by the calling user.Not done
Publishing images to GHCR from tags. The issue suggested it, but it isn't in the acceptance criteria; it's easy to add with the release.