NCA-ADS - Software and Environment Management (6% of the exam) - Section 8.1
Build reproducible Python environments with Conda and Docker.
Build reproducible Python environments by using Conda environment files or Docker images that pin RAPIDS, CUDA, and Python package versions exactly. Understand why environment reproducibility is a prerequisite for reproducible model results across different machines.
CondaDocker
Practice question for this objective
lock_openFree sampleSoftware and Environment Managementmedium
A team needs to guarantee that a RAPIDS pipeline rebuilt next year matches today's environment down to the system shared libraries, the CUDA runtime shipped in the image, and the exact application code, while remaining portable to any host that has a compatible NVIDIA driver. They already commit a conda environment YAML for Python packages. Which addition most completely closes the remaining reproducibility gaps?
ACommit a pip requirements file alongside the conda YAML so that both conda and pip package layers are captured, which together account for everything the pipeline depends on at runtime.
BBuild and version a Docker image from a pinned NVIDIA CUDA base image that installs the conda environment and copies the application code, then distribute that image by digest.check_circle Correct
CAdd a conda lock file to the repository so the transitive dependency graph is frozen exactly, which removes any remaining nondeterminism in the rebuilt environment.
DDocument the exact CUDA toolkit version and operating system in the project README so any engineer can manually provision a matching host before rebuilding the environment.
Docker images built on a pinned CUDA base bundle OS libraries, the CUDA runtime, packages, and code into one portable artefact, which conda files alone cannot. Conda manages Python-level packages but sits on top of whatever operating system and CUDA runtime the host provides. A Docker image built from a pinned NVIDIA CUDA base captures the system libraries, the runtime, the conda environment, and the code in a single digest-pinned layer, giving full-stack reproducibility on any host with a compatible driver.
Why A is wrong: Tempting because it adds package coverage, but pip and conda files capture only Python-level packages; they pin neither the system libraries nor the CUDA runtime baked below the Python layer.
Why B is correct: Correct: a Docker image built on a pinned CUDA base bundles the OS libraries, CUDA runtime, conda packages, and code into one digest-addressable artefact that runs anywhere a compatible driver exists.
Why C is wrong: A lock file does freeze the conda dependency graph, but it still sits inside whatever base OS and CUDA toolkit the host provides, so system libraries and the runtime remain unpinned.
Why D is wrong: Documentation records the target but relies on manual, error-prone provisioning; it produces no portable artefact and cannot guarantee byte-level matching of system libraries.
Answers that look right on this material and are not. Each one is a distractor from a different question in the NCA-ADS bank for this domain.
The rebuilt environment will use the latest compatible releases of each package, taking advantage of bug fixes published after the original pin.
errorWhy it is wrong: Pinning exact versions prevents any upgrade, so the latest releases are not fetched. This describes the behaviour of an unpinned or range-constrained environment, not a pinned one.
Export the full environment but manually delete the prefix line at the bottom, since the absolute prefix path is the only entry that breaks cross-platform rebuilds.
errorWhy it is wrong: Tempting because the prefix line is genuinely non-portable, but it is not what fails here; the unsolvable per-package build strings remain and still break the rebuild.
A Conda environment YAML pinning all Python packages, relying on the host machine to provide a compatible CUDA driver
errorWhy it is wrong: Conda can pin the CUDA toolkit runtime bundled alongside packages, but it cannot control or standardise the host operating system, system libraries, or driver interface; different host configurations will still cause divergence.