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

boinc service: optionally use a FHS environment #21890

Closed
wants to merge 1 commit into from

Conversation

kierdavis
Copy link
Contributor

This ensures that the BOINC project applications (immutable blobs) can
find the libraries they need to run, since many contain hardcoded paths.

Additionally, an option to install Virtualbox into the environment
and an option to install NVIDIA OpenCL/CUDA libraries into the
environment were added. Other OpenCL libraries could probably be
added similarly, but I don't have the hardware to test it on.

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

ln -s $(realpath lib/vendors) etc/OpenCL/vendors
chmod -w etc
fi
'';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a horrible bodge. Is there a better way to do this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what conditions would lib/vendors exist? It's possible this can be pushed on the nix level.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does lib/vendors come from? We should probably install it to etc/OpenCL/vendors but that depends on what happens.

Copy link
Member

@abbradar abbradar Jan 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eeh, strange. Github hasn't shown me @zimbatm's previous message previously...

Copy link
Member

@zimbatm zimbatm Jan 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's my fault. I had started the review and then left it there. Your comment reminded that I had and just published without looking at your message. For some reason github gave me precedence.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip, I've updated the PR to use something along those lines.

I'll try and have a look to see how much (if anything) will break if we change the location of nvidia.icd, and how much work it would be to change that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already researched that a bit, it turns out OpenCL is broken on NixOS right now. Patch to fix it is, luckily, trivial (and yes, includes using /etc/OpenCL/vendors; I'll make a PR soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #21995.

Copy link
Member

@abbradar abbradar Jan 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged the PR in question. nvidia_x11 should be unnecessary in the environment for OpenCL -- instead add ocl-icd.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abbradar awesome, thanks. It'll still need to optionally depend on nvidia_x11 since the CUDA libraries are required as well for NVIDIA support, but I'll make OpenCL support a separate option that pulls in ocl-icd. This new option ought to cover AMD and Intel GPUs as well.

@kierdavis kierdavis force-pushed the boinc-service branch 2 times, most recently from c02306e to 49fa951 Compare January 21, 2017 19:23
This ensures that the BOINC project applications (immutable blobs) can
find the libraries they need to run.

Additionally, options to install VirtualBox, OpenCL and NVIDIA CUDA
into the environment were added.
@kierdavis
Copy link
Contributor Author

I've made these changes and rebased onto master. Hopefully CI should pass this time...

@abbradar
Copy link
Member

abbradar commented Feb 5, 2017

If I understand correctly different applications in BOINC can require any additional dependencies. Maybe instead of adding a flag for each one (which doesn't scale) you want to add extraEnvPackages or something like that? Just a suggestion, don't mind me if you think that's less convenient.

@kierdavis
Copy link
Contributor Author

Superseded by #30908, closing.

@kierdavis kierdavis closed this Oct 28, 2017
@kierdavis kierdavis deleted the boinc-service branch November 24, 2017 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants