The image used to install only the directly pinned packages and resolved everything below them fresh from PyPI on every build, so the same commit could produce different images. The standard and slim images now install from lock files that pin every package with hashes, except PyTorch and its few own dependencies, which still come from the PyTorch index so the CPU and CUDA variants keep working. A new CI check fails when a requirements file changes without regenerating its lock, and the script that regenerates them sits next to the requirements.
Fixes#33979
Our workflows refer to actions by tag, and a tag can be moved to different code after we reviewed it. This adds GitHub's workflow lockfile, which records the exact commit behind each action version, and the workflows now name exact releases (v5.1.0 instead of v5, for example) as the lockfile tool requires. Dependabot already tracks these actions. The regression workflow that follows the tests repo's main branch is not covered.