Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU access in the sandbox #256230

Merged
merged 28 commits into from
Jun 26, 2024
Merged

Commits on Jun 26, 2024

  1. Configuration menu
    Copy the full SHA
    b422daf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    340b418 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b929969 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7ed2cba View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f22b9da View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6859a2d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6662b09 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    50d4382 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3d84ab0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3a0d777 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6a0f2ae View commit details
    Browse the repository at this point in the history
  12. programs.nix-required-mounts: presets.cuda -> nvidia-gpu

    This hopefully clarifies that the preset configures the hook to expose
    "nvidia devices", which includse both the userspace driver and the
    device nodes.
    
    The derivations  still declare requiredSystemFeatures = [ "cuda" ] to
    explicitly indicate they need to use the CUDA functionality and expect a
    libcuda.so and a CUDA-capable device. Ideally, we'd also include the
    specific CUDA architectures (sm_86, etc) in feature names.
    
    Derivations that use a co-processor but do not care about the vendor or
    even the particular interface may ask for the more generic "opengl",
    "vulkan", or "gpu" features. It is then responsibility of the host
    declaring the support for this feature to ensure the drivers and
    hardware are appropriately set up.
    SomeoneSerge committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    7418e4f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5560f6a View commit details
    Browse the repository at this point in the history
  14. nix-required-mounts: restore the followSymlinks option

    This way pkgs.nix-required-mounts is "correct" even before
    we override it in the NixOS module
    SomeoneSerge committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    3cf5bcf View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    55f54cc View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    075dd8b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    dd70727 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    61001a3 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    6a6b6ac View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    927b15e View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    9aa0403 View commit details
    Browse the repository at this point in the history
  22. cudaPackages: move cuda tests from passthru.tests

    Otherwise we crash Ofborg
    SomeoneSerge committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    efd64b5 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    39f3345 View commit details
    Browse the repository at this point in the history
  24. blender.gpuChecks: add unwrapped

    An unwrapped check for `nix run`-ing on the host platform,
    instead of `nix build`-ing in the sandbox
    
    E.g.:
    
    ```
    ❯ nix run -f ./. --arg config '{ cudaSupport = true; cudaCapabilities = [ "8.6" ]; cudaEnableForwardCompat = false; allowUnfree = true; }' -L blender.gpuChecks.cudaAvailable.unwrapped
    Blender 4.0.1
    Read prefs: "/home/user/.config/blender/4.0/config/userpref.blend"
    CUDA is available
    Blender quit
    ❯ nix build -f ./. --arg config '{ cudaSupport = true; cudaCapabilities = [ "8.6" ]; cudaEnableForwardCompat = false; allowUnfree = true; }' -L blender.gpuChecks
    blender> Blender 4.0.1
    blender> could not get a list of mounted file-systems
    blender> CUDA is available
    blender> Blender quit
    ```
    SomeoneSerge committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    da430f4 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    ff430d1 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    ebeb6b9 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    7d667a0 View commit details
    Browse the repository at this point in the history
  28. cudaPackages: updated convention for gpu/runtime checks

    Runtime tests (derivations asking for a relaxed sandbox) are now
    expected at p.gpuCheck, p.gpuChecks.<name>, or at
    p.tests.<name>.gpuCheck.
    SomeoneSerge committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    79a7186 View commit details
    Browse the repository at this point in the history