Registry / ai-ml / nvidia-cuda-runtime

nvidia-cuda-runtime

JSON →
library13.2.51pypypiunverified

The `nvidia-cuda-runtime` package provides essential native CUDA runtime libraries (e.g., `libcudart.so`) required for Python applications to utilize NVIDIA GPUs. It ensures these libraries are discoverable within a Python environment, typically without requiring a full system-wide CUDA Toolkit installation. It is primarily a dependency for deep learning frameworks like PyTorch and TensorFlow, rather than offering direct Python APIs. The current version is 13.2.51, with releases tied to NVIDIA CUDA Toolkit updates.

ai-mldata
pip install nvidia-cuda-runtime
Install & Compatibility
Where this runs
tested against v13.3.29 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
4/5 runs
py 3.11
✕ build_error
4/5 runs
py 3.12
✕ build_error
4/5 runs
py 3.13
✕ build_error
4/5 runs
py 3.9
✕ build_error
4/5 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

No direct Python imports
This package primarily provides native shared libraries and does not expose Python APIs for direct import and usage.
The impact of this package is on the environment's `LD_LIBRARY_PATH` and availability of native CUDA libraries for other GPU-accelerated Python libraries.

Since `nvidia-cuda-runtime` doesn't offer direct Python APIs, its quickstart focuses on verifying that a CUDA-enabled library (like PyTorch) can successfully detect and utilize the GPU, confirming the runtime libraries provided by this package are effective.

# This package does not provide direct Python APIs to import. # Its purpose is to make native CUDA libraries available for other Python libraries. # You can verify its effect by checking a CUDA-enabled library like PyTorch: try: import torch if torch.cuda.is_available(): print("PyTorch detected CUDA and can use NVIDIA GPU.") print(f"CUDA Version: {torch.version.cuda}") print(f"Number of GPUs: {torch.cuda.device_count()}") if torch.cuda.device_count() > 0: print(f"Current GPU: {torch.cuda.get_device_name(0)}") else: print("PyTorch cannot detect CUDA. GPU acceleration is not available.") except ImportError: print("PyTorch is not installed. Please install 'torch' to verify CUDA availability.") print("\nNote: nvidia-cuda-runtime primarily manages LD_LIBRARY_PATH and provides native shared objects.") print("It does not expose Python functions for direct import and usage by end-users.")
Debug
Known issues
breakingVersion mismatches between `nvidia-cuda-runtime`, your NVIDIA GPU driver, the CUDA Toolkit version expected by your deep learning framework (e.g., PyTorch, TensorFlow), and the `cudnn` libraries can lead to runtime errors, crashes, or incorrect behavior. Ensure all components are compatible.
fix
Always check the compatibility matrix provided by your deep learning framework for the required CUDA Toolkit and driver versions. If using `nvidia-cuda-runtime` via `pip`, ensure its version aligns with what your framework expects. Consider using the `pip install torch --index-url https://download.pytorch.org/whl/cuXXX` method, which often includes the correct runtime dependencies.
affects: All versions
gotchaThis package provides *only* the CUDA runtime shared libraries (e.g., `libcudart.so`), not the full CUDA development toolkit (which includes compilers like `nvcc`, headers, and other development tools). You cannot compile CUDA C++ code with just this package.
fix
If you need to compile CUDA code or use tools like `nvcc`, you must install the full NVIDIA CUDA Toolkit either system-wide or via a container (e.g., Docker).
affects: All versions
gotchaUsing `nvidia-cuda-runtime` alongside a system-wide CUDA Toolkit installation can lead to `LD_LIBRARY_PATH` conflicts. The Python environment's library paths (managed by this package) might prepend the system paths, causing an unintended version of CUDA libraries to be loaded.
fix
Be mindful of your `LD_LIBRARY_PATH` environment variable. In virtual environments, `nvidia-cuda-runtime` is designed to handle this. If conflicts arise, consider creating clean environments, using containers, or explicitly managing `LD_LIBRARY_PATH` to prioritize the desired CUDA installation.
affects: All versions
gotchaThe `nvidia-cuda-runtime` package does not expose any direct Python APIs for users to import or call. Its sole purpose is to make the underlying native CUDA shared libraries discoverable for other Python libraries that depend on them.
fix
Do not attempt to `import nvidia_cuda_runtime` or expect Python functions from this package. Verify its presence and functionality by checking the CUDA availability within a high-level library like PyTorch (`torch.cuda.is_available()`) or TensorFlow.
affects: All versions
Upgrade
Version history
13.3.29latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
ahrefsbot
3
node
2
bytedance
2
seranking-bot
2
Resources