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
Conversation
ln -s $(realpath lib/vendors) etc/OpenCL/vendors | ||
chmod -w etc | ||
fi | ||
''; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #21995.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
c02306e
to
49fa951
Compare
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.
49fa951
to
a215f37
Compare
I've made these changes and rebased onto master. Hopefully CI should pass this time... |
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 |
Superseded by #30908, closing. |
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
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)