Giter Site home page Giter Site logo

someoneserge / pkgs Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 613 KB

some-pkgs: a tiny monorepo for sci-comp things that don't fit in nixpkgs

Home Page: https://nur.nix-community.org/repos/some-pkgs/

License: MIT License

Nix 91.81% Shell 0.23% CMake 0.24% C++ 0.03% Python 7.69%
nix aur nixpkgs nur

pkgs's Introduction

nix-build nix-update nix flake update

Cachix Cache

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 (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 (for setting up the runtime environment, notably /run/opengl-driver/lib):

pkgs-instant-ngp-1.mp4

Transcript:

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

  • 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.

pkgs's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar someoneserge avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pawsen

pkgs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.