{"library":"nvidia-cuda-runtime-cu11","title":"NVIDIA CUDA Runtime (cu11)","description":"The `nvidia-cuda-runtime-cu11` package provides the native CUDA Runtime libraries for Python applications. It acts as a foundational component, offering Cython/Python wrappers for CUDA driver and runtime APIs, enabling higher-level Python libraries to leverage NVIDIA GPUs. This is a low-level runtime dependency rather than a library with direct user-facing Python APIs. The current version is 11.8.89. It is actively maintained by NVIDIA.","language":"python","status":"active","last_verified":"Sat Apr 11","install":{"commands":["pip install nvidia-pyindex && pip install nvidia-cuda-runtime-cu11"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\n\n# This package primarily provides runtime libraries.\n# To verify successful installation and CUDA availability in a Python environment,\n# you typically check via a framework that utilizes CUDA, like PyTorch.\n# Ensure 'torch' is installed (e.g., pip install torch --index-url https://download.pytorch.org/whl/cu118)\n\ntry:\n    import torch\n    if torch.cuda.is_available():\n        print(f\"CUDA is available! Device name: {torch.cuda.get_device_name(0)}\")\n    else:\n        print(\"CUDA is not available according to PyTorch.\")\nexcept ImportError:\n    print(\"PyTorch not installed. Install it to verify CUDA availability:\")\n    print(\"pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\")\nexcept Exception as e:\n    print(f\"An error occurred while checking CUDA with PyTorch: {e}\")","lang":"python","description":"This package doesn't expose direct Python classes or functions for general use. Its presence enables other CUDA-aware Python libraries (like PyTorch or TensorFlow) to utilize the GPU. This quickstart demonstrates how to verify CUDA availability using PyTorch, a common library that depends on CUDA runtime libraries.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}