{"id":20503189,"url":"https://github.com/curt-park/k8s-gpu-sharing-pods","last_synced_at":"2026-05-29T12:31:53.655Z","repository":{"id":252713182,"uuid":"841199741","full_name":"Curt-Park/k8s-gpu-sharing-pods","owner":"Curt-Park","description":"Tricks for GPU sharing pods on Kubernetes without any use of middleware like HAMi or DRA","archived":false,"fork":false,"pushed_at":"2024-08-24T06:50:26.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T20:38:52.979Z","etag":null,"topics":["argo-workflows","gpu","gpu-sharing","helm","kubernetes","minikube"],"latest_commit_sha":null,"homepage":"","language":"Mustache","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Curt-Park.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2024-08-11T22:39:48.000Z","updated_at":"2024-08-24T06:50:29.000Z","dependencies_parsed_at":"2024-08-24T06:25:50.895Z","dependency_job_id":"68bef267-8b7f-4497-bd9c-8aea761445f0","html_url":"https://github.com/Curt-Park/k8s-gpu-sharing-pods","commit_stats":null,"previous_names":["curt-park/k8s-gpu-sharing-pods"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Curt-Park/k8s-gpu-sharing-pods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curt-Park%2Fk8s-gpu-sharing-pods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curt-Park%2Fk8s-gpu-sharing-pods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curt-Park%2Fk8s-gpu-sharing-pods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curt-Park%2Fk8s-gpu-sharing-pods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Curt-Park","download_url":"https://codeload.github.com/Curt-Park/k8s-gpu-sharing-pods/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curt-Park%2Fk8s-gpu-sharing-pods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33652979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["argo-workflows","gpu","gpu-sharing","helm","kubernetes","minikube"],"created_at":"2024-11-15T19:29:37.886Z","updated_at":"2026-05-29T12:31:53.636Z","avatar_url":"https://github.com/Curt-Park.png","language":"Mustache","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPU Sharing Pods on Kubernetes\nBy default, Kubernetes doesn't allow GPU sharing cases as follows:\n- A pod with multiple containers that share a single GPU.\n- Multiple pods that share a single GPU.\n\nIn this repository, I introduce some tricks for GPU sharing pods on Kubernetes with only use of NVIDIA device plugin.\n\n## Prerequisites\n- Install [Kubectl](https://kubernetes.io/docs/tasks/tools/)\n- Install [Minikube](https://minikube.sigs.k8s.io/docs/start)\n- Install [HELM](https://helm.sh/docs/intro/install/)\n- Install [Argo Workflows CLI](https://github.com/argoproj/argo-workflows/releases/tag/v3.5.10)\n\n## K8s Cluster Creation\n```bash\nmake cluster\nkubectl get pods --all-namespaces\n# Check `nvidia-device-plugin-daemonset` is running.\n```\n\n## Argo Workflow Installation\n```bash\nkubectl create namespace argo\nhelm install argo-workflows charts/argo-workflows -n argo\n# Wait for argo-workflows ready...\nmake port-forward\n```\n\nOpen http://localhost:2746/\n\nLogin with the token:\n```bash\nkubectl apply -f secret.yaml\nkubectl get secret  # Check `argo-workflows-admin.service-account-token` created.\nmake token\n# Paste all strings including Bearer.\n```\n\nExecute a simple workflow for testing:\n```bash\nargo submit --watch workflows/hello-world.yaml\n```\n\u003cimg width=\"1497\" src=\"https://github.com/user-attachments/assets/ba15639e-d789-4116-bf5a-b67a129d4061\"\u003e\n\n## Examples\n\u003cimg width=\"1728\" src=\"https://github.com/user-attachments/assets/460158a9-7e3c-482b-bf48-bdcb599f9285\"\u003e\n\nCreate a workflow template that have parallel jobs sharing GPU(s).\n```bash\nkubectl apply -f workflows/templates/gpu-sharing-workflowtemplate.yaml\n```\n\nTrigger the gpu allocation and gpu-sharing workflow execution.\n```bash\n# time slicing with 1 GPU\nargo submit --watch workflows/submit-gpu-sharing-workflow.yaml\n# time slicing with 2 GPUs\nargo submit --watch workflows/submit-gpu-sharing-workflow.yaml -p gpus=2  # 2 gpus\n# MPS with 1 GPU\nargo submit --watch workflows/submit-gpu-sharing-workflow.yaml -p mps=enabled\n```\n\n## References\n- https://argo-workflows.readthedocs.io/en/latest/walk-through/argo-cli/\n- https://argo-workflows.readthedocs.io/en/latest/fields/#workflow\n- https://gist.github.com/Curt-Park/bb20f76ba2b052b03b2e1ea9834517a6\n- https://docs.nvidia.com/deploy/mps/#starting-and-stopping-mps-on-linux\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurt-park%2Fk8s-gpu-sharing-pods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurt-park%2Fk8s-gpu-sharing-pods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurt-park%2Fk8s-gpu-sharing-pods/lists"}