{"id":30071025,"url":"https://github.com/SomeoneSerge/nixpkgs-cuda-ci","last_synced_at":"2025-08-08T12:08:20.608Z","repository":{"id":37245503,"uuid":"474174739","full_name":"SomeoneSerge/nixpkgs-cuda-ci","owner":"SomeoneSerge","description":"Building and caching nixpkgs with cudaSupport=true. We push to https://cuda-maintainers.cachix.org/","archived":true,"fork":true,"pushed_at":"2024-11-28T11:26:29.000Z","size":643,"stargazers_count":23,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-07-30T05:20:29.263Z","etag":null,"topics":["computer-vision","cuda","deep-learning","nix","nixpkgs"],"latest_commit_sha":null,"homepage":"https://hercules-ci.com/github/SomeoneSerge/nixpkgs-cuda-ci","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"numtide/nixpkgs-unfree","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SomeoneSerge.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}},"created_at":"2022-03-25T21:57:49.000Z","updated_at":"2024-12-12T01:39:16.000Z","dependencies_parsed_at":"2023-10-16T11:51:15.061Z","dependency_job_id":null,"html_url":"https://github.com/SomeoneSerge/nixpkgs-cuda-ci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SomeoneSerge/nixpkgs-cuda-ci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeoneSerge%2Fnixpkgs-cuda-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeoneSerge%2Fnixpkgs-cuda-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeoneSerge%2Fnixpkgs-cuda-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeoneSerge%2Fnixpkgs-cuda-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomeoneSerge","download_url":"https://codeload.github.com/SomeoneSerge/nixpkgs-cuda-ci/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeoneSerge%2Fnixpkgs-cuda-ci/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269417542,"owners_count":24413384,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":["computer-vision","cuda","deep-learning","nix","nixpkgs"],"created_at":"2025-08-08T12:07:59.685Z","updated_at":"2025-08-08T12:08:20.593Z","avatar_url":"https://github.com/SomeoneSerge.png","language":"Nix","funding_links":[],"categories":["Overlays"],"sub_categories":[],"readme":"# nixpkgs-cuda-ci\n\nThis project is discontinued in favour of the [CUDA-enabled Nixpkgs release in-tree](https://github.com/NixOS/nixpkgs/pull/324379),\nbuilt on the [\"community Hydra\"](https://hydra.nix-community.org/jobset/nixpkgs/cuda)\nand cached at [nix-community.cachix.org](https://nix-community.org/cache/)\nwithin the nix-community infrastructure team's [effort](https://github.com/nix-community/infra/pull/1335).\nNix-Community's infrastructure is funded via an [OpenCollective project](https://nix-community.org/open-collective): consider committing for a monthly donation to ensure its continuing availability.\n\n---\n\n\u003e # ORIGINAL DESCRIPTION\n\u003e \n\u003e \n\u003e First, a word of warning: this is just a development repo that ought to be\n\u003e replaced with something sustainable later. For an up-to-date information about\n\u003e CUDA in nixpkgs seek in:\n\u003e \n\u003e - [#cuda:nixos.org](https://matrix.to/#/#cuda:nixos.org)\n\u003e - https://nixos.wiki/wiki/CUDA\n\u003e - https://nixos.org/manual/nixpkgs/unstable/#cuda\n\u003e - [discourse.nixos.org](https://discourse.nixos.org/t/announcing-the-nixos-cuda-maintainers-team-and-a-call-for-maintainers/)\n\u003e \n\u003e With the above in mind, let's proceed.\n\u003e \n\u003e ## Latest warnings\n\u003e \n\u003e - 2024-08-15: As of https://github.com/SomeoneSerge/nixpkgs-cuda-ci/pull/33,\n\u003e   this repo no longer maintains any jobsets and consumes instead the new\n\u003e   `release-cuda.nix` maintained in Nixpkgs\n\u003e - 2024-06-09: I had been having issues with the Hercules CI's \"effects\" queue\n\u003e   getting jammed, effectively shutting down the \"flake-update\" effect. The\n\u003e   effects were disabled and replaced with a flake-update github action, which\n\u003e   triggers HCI to rebuild the \"default\" job against the new master. Other jobs\n\u003e   may be at times be building stale nixpgs revisions...\n\u003e   This is all rather flaky and I haven't had time to debug this.\n\u003e - 2023-03-05: Repo no longer tries to be a drop-in substitute for nixpkgs. We\n\u003e   just build. The flake is now used to track all nixpkgs branches (-\u003e\n\u003e   flake.lock is much larger), and hercules CI's `onSchedule`, rather than a\n\u003e   GitHub workflow, is used to trigger builds. For a drop-in nixpkgs replacement\n\u003e   cf. [numtide/nixpkgs-unfree](https://github.com/numtide/nixpkgs-unfree)\n\u003e \n\u003e   We build for different cuda architectures at a different frequencies,\n\u003e   which means that to make use of the cache you might need to import nixpkgs\n\u003e   as e.g. `import \u003cnixpkgs\u003e { ...; config.cudaCapabilities = [ \"8.6\" ]; }`.\n\u003e   Cf. the flake for details\n\u003e \n\u003e ## What is this\n\u003e \n\u003e - The repo is used to build and cache the [nixpkgs](https://github.com/NixOS/nixpkgs)\n\u003e   world with `cudaSupport = true`.\n\u003e   See the dashboard at: [https://hercules-ci.com/github/SomeoneSerge/nixpkgs-cuda-ci](https://hercules-ci.com/github/SomeoneSerge/nixpkgs-cuda-ci)\n\u003e   - This means you can use pre-built pytorch, tensorflow, jax and blender with Nix\n\u003e   - This also means that [we](https://github.com/orgs/NixOS/teams/cuda-maintainers) notice and can act when things break in development branches.\n\u003e     [We build](https://github.com/SomeoneSerge/nixpkgs-unfree/blob/7c716ccef51332e90777589c53265a09a3c0fbfa/.github/workflows/sync.yml#L14):\n\u003e \n\u003e     - [`master`](https://github.com/NixOS/nixpkgs/tree/master/),\n\u003e     - [`nixos-unstable`](https://github.com/NixOS/nixpkgs/tree/nixos-unstable),\n\u003e     - [`nixpkgs-unstable`](https://github.com/NixOS/nixpkgs/tree/nixpkgs-unstable),\n\u003e     - and the last release, at the time of writing - `nixos-23.05`\n\u003e \n\u003e     We might build different branches at different frequency. We also might\n\u003e     prioritize certain `cudaCapabilities`.\n\u003e - The cachix is limited in space and has garbage collection on. This means that\n\u003e   you'd need to stay up-to-date to benefit from the cache (as we build newer\n\u003e   packages, the old cache is eventually discarded)\n\u003e - The builds currently run on volunteers' machines. We plan to soon make and\n\u003e   maintain the exact list [on wiki](https://nixos.wiki/wiki/CUDA). Each machine\n\u003e   uses its own key to push the build results to cachix and these keys can be\n\u003e   revoked without breaking the whole chain. You consume just one public key\n\u003e   listed at https://cuda-maintainers.cachix.org/. The cachix `cuda-maintainers`\n\u003e   cache and cachix keys are currently managed by\n\u003e   [@samuela](https://github.com/samuela/). Our cachix space is courtesy of\n\u003e   @domenkozar.\n\u003e \n\u003e   We hope one day to arrive at a more sustainable and trust-worthy solution,\n\u003e   but right now we're working on this as on a proof-of-concept.\n\u003e \n\u003e ## How to use\n\u003e \n\u003e - To use the cache, get [cachix](https://cachix.org/), and execute:\n\u003e \n\u003e   ```bash\n\u003e   cachix use cuda-maintainers\n\u003e   ```\n\u003e - To use the cache on NixOS, check the following snippet for your `configuration.nix` module:\n\u003e \n\u003e   ```nix\n\u003e     nix.binaryCachePublicKeys = [\n\u003e       \"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=\"\n\u003e     ];\n\u003e     nix.binaryCaches = [\n\u003e       \"https://cuda-maintainers.cachix.org\"\n\u003e     ];\n\u003e   ```\n\u003e \n\u003e   Verify that the public key comes from https://cuda-maintainers.cachix.org\n\u003e - You can also suggest the cache to users of your flake, with\n\u003e \n\u003e   ```nix\n\u003e     # ...\n\u003e \n\u003e     nixConfig = {\n\u003e       extra-substituters = [\n\u003e         \"https://cuda-maintainers.cachix.org\"\n\u003e       ];\n\u003e       extra-trusted-public-keys = [\n\u003e         \"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=\"\n\u003e       ];\n\u003e     };\n\u003e \n\u003e     outputs = { ... }: {\n\u003e       # ...\n\u003e     };\n\u003e   ```\n\u003e \n\u003e   When interacting with your flake, the users would be asked whether they want to use that cache and trust that key.\n\u003e - The most consistent albeit most expensive way to use cuda-enabled packages\n\u003e   from nixpkgs is to import them with the global `config.cudaSupport`:\n\u003e \n\u003e   ```nix\n\u003e   pkgs = import nixpkgs { config.allowUnfree = true; config.cudaSupport = true; }\n\u003e   ```\n\u003e \n\u003e   With that, `pkgs.python3Packages.jax`, `pkgs.python3Packages.pytorch`, etc evaluate into packages with cuda support.\n\u003e - This flake attempts to play a drop-in replacement (rather, a proxy) for `nixpkgs`.\n\u003e   The following usages are expected to work:\n\u003e \n\u003e   - Executing `nix run github:SomeoneSerge/nixpkgs-unfree/nixpkgs-unstable#blender` to run blender built with cuda-support\n\u003e   - Using in flake inputs: \n\u003e \n\u003e     ```nix\n\u003e     inputs.nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable;\n\u003e     inputs.nixpkgs-unfree.url = github:SomeoneSerge/nixpkgs-unfree;\n\u003e     inputs.nixpkgs-unfree.inputs.nixpkgs.follows = \"nixpkgs\";\n\u003e     ```\n\u003e   - _DEPRECATED: Using in flake inputs as a drop-in replacement for nixpkgs (unless someone does something special)_\n\u003e \n\u003e     ```nix\n\u003e     inputs.nixpkgs.url = github:SomeoneSerge/nixpkgs-unfree/nixpkgs-unstable;\n\u003e     inputs.home-manager.inputs.nixpkgs.follows = \"nixpkgs\";\n\u003e     ```\n\u003e   - _DEPRECATED: Importing as nixpkgs:_\n\u003e \n\u003e     ```nix\n\u003e     inputs.nixpkgs = github:SomeoneSerge/nixpkgs-unfree/nixpkgs-unstable;\n\u003e     outputs = { nixpkgs }:\n\u003e     let\n\u003e       system = \"x86_64-linux\";\n\u003e       overlay = final: prev: { };\n\u003e       pkgs = import nixpkgs { overlays = [ overlay ]; };\n\u003e     in\n\u003e     {\n\u003e       # ...\n\u003e     }\n\u003e     ```\n\u003e \n\u003e     Note that if you pass `config` in the arguments, you must again include `cudaSupport` and `allowUnfree`\n\u003e - _NOTE: Setting `\u003cnixpkgs\u003e` to point at this repo has proven a somewhat painful\n\u003e   experience. Most problems concentrate around tools using \n\u003e   `import \u003cnixpkgs/lib\u003e`. There's a proxy in [./lib](./lib) right now which makes these import\n\u003e   work, but almost certainly at the cost of downloading a yet another copy of\n\u003e   nixpkgs..._\n\u003e - If you're only enabling the cache on a per-project or per-user basis, you might need to set `trusted-users = ${yourName}` in `/etc/nix/nix.conf`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSomeoneSerge%2Fnixpkgs-cuda-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSomeoneSerge%2Fnixpkgs-cuda-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSomeoneSerge%2Fnixpkgs-cuda-ci/lists"}