{"id":20983003,"url":"https://github.com/tkestack/gpu-manager","last_synced_at":"2025-05-16T09:02:42.774Z","repository":{"id":37617404,"uuid":"219713707","full_name":"tkestack/gpu-manager","owner":"tkestack","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-02T09:23:26.000Z","size":56078,"stargazers_count":871,"open_issues_count":69,"forks_count":236,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-09T03:14:09.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkestack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2019-11-05T10:05:18.000Z","updated_at":"2025-04-08T05:40:48.000Z","dependencies_parsed_at":"2024-06-18T20:12:11.867Z","dependency_job_id":null,"html_url":"https://github.com/tkestack/gpu-manager","commit_stats":{"total_commits":47,"total_committers":10,"mean_commits":4.7,"dds":0.3191489361702128,"last_synced_commit":"f0669de638b024e3d9e5ecdcfdb239face4e52fd"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fgpu-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fgpu-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fgpu-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkestack%2Fgpu-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkestack","download_url":"https://codeload.github.com/tkestack/gpu-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501548,"owners_count":22081526,"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-19T05:47:24.506Z","updated_at":"2025-05-16T09:02:42.719Z","avatar_url":"https://github.com/tkestack.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# GPU Manager\n\n[![Build Status](https://travis-ci.org/tkestack/gpu-manager.svg?branch=master)](https://travis-ci.org/tkestack/gpu-manager)\n\nGPU Manager is used for managing the nvidia GPU devices in Kubernetes cluster. It implements the `DevicePlugin` interface\nof Kubernetes. So it's compatible with 1.9+ of Kubernetes release version. \n\nTo compare with the combination solution of `nvidia-docker`\nand `nvidia-k8s-plugin`, GPU manager will use native `runc` without modification but nvidia solution does.\nBesides we also support metrics report without deploying new components. \n\nTo schedule a GPU payload correctly, GPU manager should work with [gpu-admission](https://github.com/tkestack/gpu-admission) which is a\n kubernetes scheduler plugin.\n\nGPU manager also supports the payload with fraction resource of GPU device such as 0.1 card or 100MiB gpu device memory.\nIf you want this kind feature, please refer to [vcuda-controller](https://github.com/tkestack/vcuda-controller) project.\n\n## Build\n\n**1.** Build binary\n\n- Prerequisite\n   - CUDA toolkit\n    \n```\nmake\n```\n\n**2.** Build image\n\n- Prerequisite\n    - Docker\n\n```\nmake img\n```\n\n## Prebuilt image\n\nPrebuilt image can be found at `thomassong/gpu-manager`\n\n## Deploy\n\nGPU Manager is running as daemonset, and because of the RABC restriction and hydrid cluster,\nyou need to do the following steps to make this daemonset run correctly.\n\n- service account and clusterrole\n\n```\nkubectl create sa gpu-manager -n kube-system\nkubectl create clusterrolebinding gpu-manager-role --clusterrole=cluster-admin --serviceaccount=kube-system:gpu-manager\n```\n\n- label node with `nvidia-device-enable=enable`\n\n```\nkubectl label node \u003cnode\u003e nvidia-device-enable=enable\n```\n\n- submit daemonset yaml\n\n```\nkubectl create -f gpu-manager.yaml\n```\n\n## Pod template example\n\nThere is nothing special to submit a Pod except the description of GPU resource is no longer 1\n. The GPU\nresources are described as that 100 `tencent.com/vcuda-core` for 1 GPU and N `tencent.com/vcuda-memory` for GPU memory (1 tencent.com/vcuda-memory means 256Mi\nGPU memory). And because of the limitation of extend resource validation of Kubernetes, to support\nGPU utilization limitation, you should add `tencent.com/vcuda-core-limit: XX` in the annotation\n field of a Pod.\n \n **Notice: the value of `tencent.com/vcuda-core` is either the multiple of 100 or any value\nsmaller than 100.For example, 100, 200 or 20 is valid value but 150 or 250 is invalid**\n\n- Submit a Pod with 0.3 GPU utilization and 7680MiB GPU memory with 0.5 GPU utilization limit\n\n```\napiVersion: v1\nkind: Pod\nmetadata:\n  name: vcuda\n  annotations:\n    tencent.com/vcuda-core-limit: 50\nspec:\n  restartPolicy: Never\n  containers:\n  - image: \u003ctest-image\u003e\n    name: nvidia\n    command:\n    - /usr/local/nvidia/bin/nvidia-smi\n    - pmon\n    - -d\n    - 10\n    resources:\n      requests:\n        tencent.com/vcuda-core: 50\n        tencent.com/vcuda-memory: 30\n      limits:\n        tencent.com/vcuda-core: 50\n        tencent.com/vcuda-memory: 30\n```\n\n- Submit a Pod with 2 GPU card\n\n```\napiVersion: v1\nkind: Pod\nmetadata:\n  name: vcuda\nspec:\n  restartPolicy: Never\n  containers:\n  - image: \u003ctest-image\u003e\n    name: nvidia\n    command:\n    - /usr/local/nvidia/bin/nvidia-smi\n    - pmon\n    - -d\n    - 10\n    resources:\n      requests:\n        tencent.com/vcuda-core: 200\n        tencent.com/vcuda-memory: 60\n      limits:\n        tencent.com/vcuda-core: 200\n        tencent.com/vcuda-memory: 60\n```\n\n## FAQ\n\nIf you have some questions about this project, you can first refer to [FAQ](./docs/faq.md) to find a solution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkestack%2Fgpu-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkestack%2Fgpu-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkestack%2Fgpu-manager/lists"}