The NVIDIA GPU Cloud (NGC) SDK is a Python library that enables developers to integrate their applications and utilities with NVIDIA GPU Cloud. It provides programmatic access to NGC services, allowing users to manage resources, run jobs, and interact with the NGC catalog. The library is currently at version 4.17.0 and sees active development with frequent releases.
pip install ngcsdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize and configure the `ngcsdk` client using an API key. It's crucial to obtain an API key from the NVIDIA NGC website (ngc.nvidia.com/setup) and ideally store it as an environment variable (`NGC_API_KEY`) for secure access. The `configure` method persists these settings for subsequent SDK operations.
Use `os.environ.get('NGC_API_KEY')` to retrieve API keys. Avoid hardcoding sensitive credentials. Ensure the API key is generated and saved securely from `ngc.nvidia.com/setup`.Verify your network connection, DNS settings, and proxy configurations. Ensure `https://authn.nvidia.com` is reachable. Environment variables like `HTTPS_PROXY` might need to be set if behind a corporate proxy.
Pin your `ngcsdk` version in `requirements.txt` (e.g., `ngcsdk==4.17.0`) to ensure consistent behavior across deployments. Review release notes for new versions to understand potential impacts.
Check your internet connectivity. If you are behind a corporate proxy, set the `HTTPS_PROXY` and `HTTP_PROXY` environment variables to your proxy server address (e.g., `export HTTPS_PROXY="http://your.proxy.com:port"`).
Verify your DNS configuration. Ensure your system can resolve external hostnames. This can also be caused by proxy issues; try the `HTTPS_PROXY` fix mentioned above if applicable.
For invalid wheel errors, ensure you are installing `ngcsdk` directly via `pip install ngcsdk` rather than from a manually downloaded wheel, and that your Python environment is healthy. For dependency conflicts, try installing `ngcsdk` in a clean virtual environment first. If conflicts persist with other libraries, inspect dependency trees (`pip show ngcsdk` and `pipdeptree`) to identify the conflicting packages and adjust versions accordingly.