{"id":20111381,"url":"https://github.com/openstack/charm-nova-compute-nvidia-vgpu","last_synced_at":"2025-05-06T10:33:14.568Z","repository":{"id":66174674,"uuid":"459823749","full_name":"openstack/charm-nova-compute-nvidia-vgpu","owner":"openstack","description":"Juju Charm - Nova Compute - plugin for NVidia vGPU. Mirror of code maintained at opendev.org.","archived":false,"fork":false,"pushed_at":"2024-11-18T17:16:54.000Z","size":114,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T11:52:42.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opendev.org/openstack/charm-nova-compute-nvidia-vgpu","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-16T02:27:55.000Z","updated_at":"2024-11-18T17:16:58.000Z","dependencies_parsed_at":"2023-02-21T05:16:05.913Z","dependency_job_id":"b232b23c-464e-4735-a2bc-95227542bd72","html_url":"https://github.com/openstack/charm-nova-compute-nvidia-vgpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-nova-compute-nvidia-vgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-nova-compute-nvidia-vgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-nova-compute-nvidia-vgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openstack%2Fcharm-nova-compute-nvidia-vgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openstack","download_url":"https://codeload.github.com/openstack/charm-nova-compute-nvidia-vgpu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252666311,"owners_count":21785240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T18:15:53.583Z","updated_at":"2025-05-06T10:33:14.300Z","avatar_url":"https://github.com/openstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis subordinate charm provides the Nvidia vGPU support to the\n[OpenStack Nova Compute service][charm-nova-compute].\n\n# Usage\n\n## Deployment\n\nWe are assuming a pre-existing OpenStack deployment (Queens or newer).\n\nDeploy nova-compute-nvidia-vgpu as a subordinate to the nova-compute charm:\n\n    juju deploy ch:nova-compute-nvidia-vgpu --channel=yoga/edge\n    juju add-relation nova-compute-nvidia-vgpu:nova-vgpu nova-compute:nova-vgpu\n\nPass the [proprietary NVIDIA software package][nvidia-software] (`510.47.03` or\nnewer) as a resource to the charm:\n\n    juju attach nova-compute-nvidia-vgpu \\\n        nvidia-vgpu-software=./nvidia-vgpu-ubuntu-510_510.47.03_amd64.deb\n\nOnce the model settles, reboot the corresponding compute nodes:\n\n    juju run -a nova-compute-nvidia-vgpu -- sudo reboot\n\n### vGPU type definition\n\nEach compute node has one or several physical GPUs. Each physical GPU can then\nbe divided into one or several [virtual GPUs][virtual-gpu] of a given type.\nVirtual GPUs will later be claimed by and exposed to guests upon guest\ncreation. Start by listing the available vGPU types for each physical GPU:\n\n    juju run-action nova-compute-nvidia-vgpu/0 list-vgpu-types --wait\n    [...]\n        nvidia-256, 0000:41:00.0, GRID RTX6000-1Q, num_heads=4, frl_config=60, framebuffer=1024M, max_resolution=5120x2880, max_instance=24\n        nvidia-257, 0000:41:00.0, GRID RTX6000-2Q, num_heads=4, frl_config=60, framebuffer=2048M, max_resolution=7680x4320, max_instance=12\n        nvidia-258, 0000:41:00.0, GRID RTX6000-3Q, num_heads=4, frl_config=60, framebuffer=3072M, max_resolution=7680x4320, max_instance=8\n        nvidia-259, 0000:41:00.0, GRID RTX6000-4Q, num_heads=4, frl_config=60, framebuffer=4096M, max_resolution=7680x4320, max_instance=6\n    [...]\n        nvidia-105, 0000:c1:00.0, GRID V100-1Q, num_heads=4, frl_config=60, framebuffer=1024M, max_resolution=5120x2880, max_instance=16\n        nvidia-106, 0000:c1:00.0, GRID V100-2Q, num_heads=4, frl_config=60, framebuffer=2048M, max_resolution=7680x4320, max_instance=8\n        nvidia-107, 0000:c1:00.0, GRID V100-4Q, num_heads=4, frl_config=60, framebuffer=4096M, max_resolution=7680x4320, max_instance=4\n        nvidia-108, 0000:c1:00.0, GRID V100-8Q, num_heads=4, frl_config=60, framebuffer=8192M, max_resolution=7680x4320, max_instance=2\n    [...]\n\nAs we can see, `nova-compute-nvidia-vgpu/0` has two physical GPUs:\n`0000:41:00.0` and `0000:c1:00.0`. By selecting the vGPU type `nvidia-108` on\n`0000:c1:00.0`, two vGPUs will be available for future guests:\n\n    juju config nova-compute-nvidia-vgpu vgpu-device-mappings=\"{'nvidia-108': ['0000:c1:00.0']}\"\n\n\u003e **NOTE**: on releases older than Stein, only one vGPU type can be selected\n\u003e accross all available physical GPUs. Starting from Stein each physical GPU\n\u003e can be assigned a different vGPU type.\n\nOn OpenStack Stein and newer, once the model has settled, these vGPUs can be\nlisted via the OpenStack CLI:\n\n    openstack resource provider list\n    +--------------------------------------+-----------------------------------+------------+--------------------------------------+--------------------------------------+\n    | uuid                                 | name                              | generation | root_provider_uuid                   | parent_provider_uuid                 |\n    +--------------------------------------+-----------------------------------+------------+--------------------------------------+--------------------------------------+\n    | 0883c2b5-bad2-4abc-a179-e33344361475 | node-sparky.maas                  |          2 | 0883c2b5-bad2-4abc-a179-e33344361475 | None                                 |\n    | 4b0dbc58-0c85-4a80-8dd6-d43d1bd6ec53 | node-sparky.maas_pci_0000_c1_00_0 |          1 | 0883c2b5-bad2-4abc-a179-e33344361475 | 0883c2b5-bad2-4abc-a179-e33344361475 |\n    +--------------------------------------+-----------------------------------+------------+--------------------------------------+--------------------------------------+\n\n    openstack resource provider inventory list 4b0dbc58-0c85-4a80-8dd6-d43d1bd6ec53\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n    | resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total | used |\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n    | VGPU           |              1.0 |        1 |        2 |        0 |         1 |     2 |    0 |\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n\n### Nova flavor definition\n\nIn order to expose a vGPU of the type defined earlier to any guest created with\nthe `m1.small` flavor, create a new trait and assign it to the flavor:\n\n    openstack --os-placement-api-version 1.6 trait create CUSTOM_NVIDIA_108\n    openstack --os-placement-api-version 1.6 resource provider trait set --trait CUSTOM_NVIDIA_108 4b0dbc58-0c85-4a80-8dd6-d43d1bd6ec53\n    openstack flavor set m1.small --property resources:VGPU=1 --property trait:CUSTOM_NVIDIA_108=required\n\n\u003e **NOTE**: on releases older than Stein, since there is only one vGPU type\n\u003e and it doesn't show up in the resource provider list, no trait can be\n\u003e created. The flavor can simply be modified with\n\u003e `openstack flavor set m1.small --property resources:VGPU=1`\n\nAfter creating an instance of this flavor, the resource provider inventory\nlist will show one vGPU being used:\n\n    openstack server create --flavor m1.small ...\n    openstack resource provider inventory list 4b0dbc58-0c85-4a80-8dd6-d43d1bd6ec53\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n    | resource_class | allocation_ratio | min_unit | max_unit | reserved | step_size | total | used |\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n    | VGPU           |              1.0 |        1 |        2 |        0 |         1 |     2 |    1 |\n    +----------------+------------------+----------+----------+----------+-----------+-------+------+\n\n# Bugs\n\nPlease report bugs on [Launchpad][lp-bugs-nova-nvidia].\n\nFor general questions please refer to the [OpenStack Charm Guide][cg].\n\n\u003c!-- LINKS --\u003e\n\n[charm-nova-compute]: https://jaas.ai/nova-compute\n[cg]: https://docs.openstack.org/charm-guide\n[lp-bugs-nova-nvidia]: https://bugs.launchpad.net/charm-nova-compute-nvidia-vgpu/+filebug\n[nvidia-software]: https://docs.nvidia.com/grid/index.html\n[virtual-gpu]: https://docs.openstack.org/nova/ussuri/admin/virtual-gpu.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-nova-compute-nvidia-vgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenstack%2Fcharm-nova-compute-nvidia-vgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenstack%2Fcharm-nova-compute-nvidia-vgpu/lists"}