8.2 Conda, pip and Docker

NCA-ADS · Software and Environment Management (6% of the exam) · Official objective: “Configuring reproducible Python environments using Conda, PIP, or Docker”

How conda and pip handle CUDA libraries, and lean custom images.

Key points

  1. Conda manages both Python and non-Python packages. pip installs Python packages and relies on the system for the rest. CUDA means NVIDIA's parallel computing platform.

    What NVIDIA says (2)

    “When installing libraries via conda, the package manager automatically pulls the required CUDA runtime libraries alongside CuPy and other dependencies, providing complete dependency management in a single installation step.”

    — RAPIDS Deployment: Custom RAPIDS Docker guide

    “Since pip cannot install system-level CUDA libraries, CuPy expects these libraries to already be present in the system environment.”

    — RAPIDS Deployment: Custom RAPIDS Docker guide

  2. A container image packages software and its dependencies. Smaller images move and start faster.

    What NVIDIA says (1)

    “These size reductions result in faster container pulls and deployments, reduced storage costs in container registries, lower bandwidth usage in distributed environments, and quicker startup times for containerized applications.”

    — RAPIDS Deployment: Custom RAPIDS Docker guide

Key terms

Sample question

Why does a conda-based RAPIDS container start from a small cuda-base image, while a pip-based one needs CUDA libraries already present?

Show the answer

Answer: Conda installs the CUDA runtime libraries as dependencies; pip cannot install system-level CUDA libraries

Conda manages both Python and non-Python packages. pip installs Python packages and relies on the system for the rest. CUDA means NVIDIA's parallel computing platform.

What NVIDIA says (2)

“When installing libraries via conda, the package manager automatically pulls the required CUDA runtime libraries alongside CuPy and other dependencies, providing complete dependency management in a single installation step.”

— RAPIDS Deployment: Custom RAPIDS Docker guide

“Since pip cannot install system-level CUDA libraries, CuPy expects these libraries to already be present in the system environment.”

— RAPIDS Deployment: Custom RAPIDS Docker guide

Practice 8.2 (2 questions) Full Software and Environment Management guide

← 8.1 Environment files · 8.3 Dependencies and team collaboration →