Skip to main content

AzureML NVIDIA GPU Cloud tools

The code contained within this repository allows pulling the images from NVIDIA GPU Cloud (NGC).

Installation

To install this package type

pip install azureml-ngc-tools

Alternatively, clone this repository and use python to install.

git clone https://github.com/.../azureml-ngc-tools.git
python setup.py install

Configuration

Two configuration files are required:

  1. A json file that contains the parameters to log in to AzureML Workspace and create Compute Target. All the parameters shown below need to be provided.
{
    "azureml_user":
    {
        "subscription_id": "<YOUR-SUBSCRIPTION-ID>",
        "resource_group": "<YOUR-RESOURCE-GROUP>",
        "workspace_name": "<YOUR-WORKSPACE-NAME>",
        "telemetry_opt_out": <true|false>
    },
    "aml_compute":
    {
        "ct_name":"<NAME-OF-YOUR-COMPUTE-TARGET>",
        "exp_name":"<NAME-OF-YOUR-EXPERIMENT>",
        "vm_name":"<SIZE-OF-THE-AZUREML-VM>",
        "admin_name":"<ADMINISTRATOR-NAME>",
        "min_nodes":<MINIMUM-NUMBER-OF-NODES>,
        "max_nodes":<MAXIMUM-NUMBER-OF-NODES>,
        "vm_priority": "<dedicated|lowpriority>",
        "idle_seconds_before_scaledown":<NUMBER-OF-SECONDS-TO-SCALE-DOWN>,
        "python_interpreter":"<PATH-TO-PYTHON-INTERPRETER>",
        "conda_packages":[<LIST-OF-ADDITIONAL-CONDA-OR-PIP-PACKAGES>],
        "environment_name":"<NAME-OF-ENVIRONMENT>",
        "docker_enabled":<true|false>,
        "user_managed_dependencies":<true|false>,
        "jupyter_port":<JUPYTER-PORT-FOR-FORWARDING>
    }
}

An example (fictitious):

{
    "azureml_user":
    {
        "subscription_id": "ef4455fa-3e35-433c-a410-76d7a8a9e793",
        "resource_group": "sample-rg",
        "workspace_name": "sample-ws",
        "telemetry_opt_out": false
    },
    "aml_compute":
    {
        "ct_name":"sample-ct",
        "exp_name":"sample-exp",
        "vm_name":"Standard_NC6s_v3",
        "admin_name": "sample",
        "min_nodes":0,
        "max_nodes":1,
        "vm_priority": "dedicated",
        "idle_seconds_before_scaledown":300,
        "python_interpreter":"/usr/bin/python",
        "conda_packages":["matplotlib","jupyterlab"],
        "environment_name":"sample_env",
        "docker_enabled":true,
        "user_managed_dependencies":true,
        "jupyter_port":9000
    }
}

  1. A json file that contains information about the content you want to download from NGC. The base_dockerfile parameter shown below needs to be provided.
{
    "base_dockerfile":"<URI-TO-NGC-CONTAINER>",
    "additional_content": {
        "download_content": false,
        "unzip_content": false,
        "upload_content": false,
        "list":[
            {
                "url": <URL_TO_CONTENT>,
                "filename": <FILENAME_TO_SAVE_TO>,
                "localdirectory": <DIRECTORY_TO_EXTRACT_CONTENTS>,
                "computedirectory": <DIRECTORY_TO_UPLOAD_CONTENTS>,
                "zipped": <false|true>
            },
            ...
        ]
    }
}

An example:

{
    "base_dockerfile":"nvcr.io/nvidia/clara-train-sdk:v3.0",
    "additional_content": {
        "download_content": true,
        "unzip_content": true,
        "upload_content": true,
        "list":[
            {
                "url":"https://api.ngc.nvidia.com/v2/resources/nvidia/med/getting_started/versions/1/zip",
                "filename":"clarasdk.zip",
                "localdirectory":"clara",
                "computedirectory":"clara",
                "zipped":true
            }
        ]
    }
}

Usage

Assuming that the AzureML config file is user_config.json and the NGC config file is ngc_app.json, and both of the files are located in the same folder, to create the cluster run the following code

azureml-ngc-tools --login user_config.json --app ngc_app.json

Metadata

Release files for azureml-ngc-tools 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azureml-ngc-tools 1.5.1
File Size Uploaded Provenance
azureml_ngc_tools-1.5.1.tar.gz 40.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for azureml-ngc-tools 1.5.1
File Interpreter ABI Platform
azureml_ngc_tools-1.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.9 kB

Release files / azureml_ngc_tools-1.5.1.tar.gz

Download URL azureml_ngc_tools-1.5.1.tar.gz
Size 40.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a7a3dd39e2b225ca623c1d5a9fdb98a5ebe47bafe647fb31256e6069fa11c55f
BLAKE2b-256 checksum
How to use checksums
beefd239318060014ca7c1b9317e034eb9e55af31d8cc69933bb049aa0e3b699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / azureml_ngc_tools-1.5.1-py3-none-any.whl

Download URL azureml_ngc_tools-1.5.1-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd97924a9781a7b724a31e881ba912f35b1fe41b51d162a1a1693e7fc98d2b18
BLAKE2b-256 checksum
How to use checksums
278e00afcc9d4ea2fe7411c9fab7955e67b26811480a838ccd783bdc069c3cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Security for azureml-ngc-tools 1.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page