8.2 Conda, pip and Docker
How conda and pip handle CUDA libraries, and lean custom images.
Key points
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.”
“Since pip cannot install system-level CUDA libraries, CuPy expects these libraries to already be present in the system environment.”
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.”
Key terms
- conda: A package and environment manager that installs Python and non-Python packages, including CUDA libraries.
- pip: Python's standard package installer; it cannot install system-level CUDA libraries.
- Container: A packaged environment with an app and its dependencies that runs the same on any host.
- Dockerfile: A text recipe for building a container image.
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.”
“Since pip cannot install system-level CUDA libraries, CuPy expects these libraries to already be present in the system environment.”
Practice 8.2 (2 questions) Full Software and Environment Management guide
← 8.1 Environment files · 8.3 Dependencies and team collaboration →