Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/someoneserge/pkgs
some-pkgs: a tiny monorepo for sci-comp things that don't fit in nixpkgs
https://github.com/someoneserge/pkgs
aur nix nixpkgs nur
Last synced: 4 months ago
JSON representation
some-pkgs: a tiny monorepo for sci-comp things that don't fit in nixpkgs
- Host: GitHub
- URL: https://github.com/someoneserge/pkgs
- Owner: SomeoneSerge
- License: mit
- Created: 2022-01-19T22:04:26.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-15T05:22:47.000Z (10 months ago)
- Last Synced: 2024-04-15T23:13:57.637Z (10 months ago)
- Topics: aur, nix, nixpkgs, nur
- Language: Nix
- Homepage: https://nur.nix-community.org/repos/some-pkgs/
- Size: 596 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [some-pkgs](https://nur.nix-community.org/repos/some-pkgs/)
- Based on [NUR](https://github.com/nix-community/NUR)
- A template repo: https://github.com/nix-community/nur-packages-template[![nix-build](https://github.com/SomeoneSerge/pkgs/actions/workflows/build.yml/badge.svg)](https://github.com/SomeoneSerge/pkgs/actions/workflows/build.yml)
[![nix-update](https://github.com/SomeoneSerge/pkgs/actions/workflows/update.yml/badge.svg)](https://github.com/SomeoneSerge/pkgs/actions/workflows/update.yml)
[![nix flake update](https://github.com/SomeoneSerge/pkgs/actions/workflows/nix-flake-update.yml/badge.svg)](https://github.com/SomeoneSerge/pkgs/actions/workflows/nix-flake-update.yml)[![Cachix Cache](https://img.shields.io/badge/cachix-pkgs-blue.svg)](https://pkgs.cachix.org)
## Deploying the undeployable with Nix
Sci-Comp and Deep Learning projects are notoriously hard to build and deploy:
even to satisfy the build-time dependencies people inevitably fall back to [building things in Docker](https://github.com/NVlabs/instant-ngp/issues/20) (build-time isolation).
And when building things in Docker, they would some times fetch dependencies through conda.
And then they would take the stock they've built through sweat and blood, and run it in containers (run-time isolation).
And that is just the beginning: later, for example, they'll seek for ways to establish a communication between the container and the host system's X-server (that they've put so much effort in isolating from).When they have gone through all these pains and struggles, and had cheered at a running visualizer from some old baseline project, in a month or two they should probably find that, in spite of all effort, their hard-won trophey won't acknowledge their CUDA installation anymore, and nobody knows why.
Now, have you really considered if there ever was a need for Docker or Kubernetes?
Enter [Nix (for building things) and NixOS](https://nixos.org/) (for setting up the runtime environment, notably `/run/opengl-driver/lib`):
https://user-images.githubusercontent.com/9720532/162585397-7528d249-4db1-4931-930c-3929775d61ea.mp4
Transcript:
```bash
nix build github:SomeoneSerge/pkgs/unfree#instant-ngp.data
nix build github:SomeoneSerge/pkgs/unfree#instant-ngp.configs
nix run github:SomeoneSerge/pkgs/unfree#instant-ngp -- --scene ./result-data/nerf/fox/ --config ./result-configs/nerf/base.json
```DISCLAIMER:
> - The video demonstrates https://github.com/NVlabs/instant-ngp
> - **`/run/opengl-driver/lib/`**
>
> Nix deploys its executables and libraries with absolute paths to
> concrete versions of their dependencies that are guaranteed to work
> (e.g. through Runpath in ELF headers on Linux).
> However, this doesn't apply to hardware-specific dependencies, like graphics and compute drivers.
> For `nix run` to work with OpenGL or CUDA-enabled applications,
> one needs to symlink their hardware-dependent drivers
> in `/run/opengl-driver/lib`. NixOS does that automatically when
> [`hardware.opengl.enable = true`](https://nixos.org/manual/nixos/stable/options.html#opt-hardware.opengl.enable)
> - **NixGL**
>
> When running on Ubuntu&c one may face an issue that their graphics driver
> links against a revision libc older than the one used by this repo. In
> these cases a temporary workaround could be
> [NixGL](https://github.com/guibou/nixGL).