{"id":21262815,"url":"https://github.com/michaelfranzl/image_debian-gpgpu","last_synced_at":"2026-05-10T14:49:45.398Z","repository":{"id":147443654,"uuid":"450782554","full_name":"michaelfranzl/image_debian-gpgpu","owner":"michaelfranzl","description":"Dockerfile for a Debian base image with AMD and Nvidia GPGPU support","archived":false,"fork":false,"pushed_at":"2022-01-22T11:17:15.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T07:45:52.983Z","etag":null,"topics":["amd","container","container-image","cuda","debian","docker","gpgpu","nvidia","opencl"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/michaelfranzl.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":"2022-01-22T10:18:20.000Z","updated_at":"2022-01-23T13:53:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0417ed6-3e03-47a9-9350-521ad22e28ac","html_url":"https://github.com/michaelfranzl/image_debian-gpgpu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michaelfranzl/image_debian-gpgpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fimage_debian-gpgpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fimage_debian-gpgpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fimage_debian-gpgpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fimage_debian-gpgpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelfranzl","download_url":"https://codeload.github.com/michaelfranzl/image_debian-gpgpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelfranzl%2Fimage_debian-gpgpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32860226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["amd","container","container-image","cuda","debian","docker","gpgpu","nvidia","opencl"],"created_at":"2024-11-21T04:59:26.986Z","updated_at":"2026-05-10T14:49:45.379Z","avatar_url":"https://github.com/michaelfranzl.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# image_debian-gpgpu\n\nDockerfile for a Debian 11 base image with AMD and Nvidia GPGPU (OpenCL, CUDA) support.\n\n## Host preparation for GPU hardware acceleration on Debian 11\n\n### AMD GPU\n\nIt is very easy to set up AMD computing using just the official Debian repos:\n\n```sh\napt install ocl-icd-libopencl1 mesa-opencl-icd\n```\n\nThen use `clinfo` (from the package `clinfo`) to display information about your hardware platform.\n\nYou can monitor the GPU load using `radeontop` (from the package `radeontop`).\n\nThe devices in the directory `/dev/dri` provide hardware access and must be exposed to the container\nusing the `--device` argument of `docker run`. The device nodes in this directory\n(`/dev/dri/renderD128` or similar) have permissions `crw-rw----+ root render`. Because mounting this\ndirectory as a Docker volume doesn't change the permissions or ownership, the container's\n`fahclient` user needs to be placed in the same `render` group (with the same GID) so that there\nwill be access to this device. Sadly, GIDs are not uniform across systems, and even may depend on the\ninstallation order of applications; this means that the container image needs to be re-built\nfor every host using a custom `docker build` argument (see below).\n\n### Nvidia GPU\n\nIt is also very easy to set up NVidia computing using just the official Debian repos. Simply install\nthe `nvidia-opencl-icd` package (from the Debian `non-free` component). This will pull in a large\nswathe of recommended packages like the non-free, proprietary Nvidia graphics driver, `libcuda1`,\n`nvidia-smi`, etc.\n\n```\napt install nvidia-opencl-icd\n\nThe following additional packages will be installed:\n  glx-alternative-mesa glx-alternative-nvidia glx-diversions libcuda1 libnvidia-cfg1 libnvidia-compiler libnvidia-ml1 libnvidia-ptxjitcompiler1 libpci3 nvidia-alternative\n  nvidia-installer-cleanup nvidia-kernel-common nvidia-kernel-dkms nvidia-kernel-support nvidia-legacy-check nvidia-modprobe nvidia-opencl-common nvidia-persistenced nvidia-smi\n  nvidia-support ocl-icd-libopencl1 pci.ids pciutils update-glx\nSuggested packages:\n  libgl1-mesa-glx | libgl1 nvidia-driver | nvidia-driver-any nvidia-cuda-mps wget | curl | lynx-cur\nRecommended packages:\n  libcuda1:i386\nThe following NEW packages will be installed:\n  glx-alternative-mesa glx-alternative-nvidia glx-diversions libcuda1 libnvidia-cfg1 libnvidia-compiler libnvidia-ml1 libnvidia-ptxjitcompiler1 libpci3 nvidia-alternative\n  nvidia-installer-cleanup nvidia-kernel-common nvidia-kernel-dkms nvidia-kernel-support nvidia-legacy-check nvidia-modprobe nvidia-opencl-common nvidia-opencl-icd\n  nvidia-persistenced nvidia-smi nvidia-support ocl-icd-libopencl1 pci.ids pciutils update-glx\n0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.\nNeed to get 50.1 MB of archives.\nAfter this operation, 157 MB of additional disk space will be used.\n```\n\nNow you need to reboot so that the proprietary Nvidia driver will be loaded. After, you can list\ngeneral information about your card by running `nvidia-smi` from the `nvidia-smi` package, or OpenCL\ncapabilities by running `clinfo` from the `clinfo` package. This also works on headless machines.\n\nIf you don't know if or how your Nvidia GPU is supported by Debian, try running `nvidia-detect` from\nthe `nvidia-detect` package.\n\n#### Exposing Nvidia GPUs to containers\n\nWhile AMD GPUs can be exposed to containers using plain Docker without any additional steps,\nNvidia GPUs need additional software (https://github.com/NVIDIA/nvidia-docker) which is not in the\nofficial Debian repositories. This adds support for the `--gpus` command line switch of the `docker`\ncommand line interface. The installation boils down to the following:\n\n```sh\napt install curl\ncurl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -\necho 'deb https://nvidia.github.io/libnvidia-container/experimental/debian10/$(ARCH) /' \u003e\u003e /etc/apt/sources.list.d/nvidia-container-runtime.list\necho 'deb https://nvidia.github.io/nvidia-container-runtime/experimental/debian10/$(ARCH) /' \u003e\u003e /etc/apt/sources.list.d/nvidia-container-runtime.list\napt update\napt install nvidia-docker2\nsystemctl restart docker\n```\n\nThis [Github issue\ncomment](https://github.com/NVIDIA/nvidia-docker/issues/1268#issuecomment-632692949) explains the\ninvolved software. Debian 11 shipped with a new `cgroups` system for which Nvidia has recently\n[shipped support](https://github.com/NVIDIA/nvidia-docker/issues/1268#issuecomment-632692949) (this\nis why the packages are in the `experimental/debian10` repo).\n\n## Building the image\n\n```sh\ndocker build -t debian-gpgpu --build-arg RENDER_GID=$(getent group render | awk -F: '{print $3}') .\n```\n\n## Running the image\n\n```sh\ndocker run debian-gpgpu\n```\n\n* To expose AMD GPU(s) to the container, add the Docker argument `--device /dev/dri:/dev/dri`.\n* To expose Nvidia GPU(s) to the container, add the Docker argument `--gpus all`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelfranzl%2Fimage_debian-gpgpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelfranzl%2Fimage_debian-gpgpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelfranzl%2Fimage_debian-gpgpu/lists"}