Hi, I recently tried to install Folding at Home on my Ubuntu 20.04 laptop. Unfortunately a dependency is missing for FAHControl to work, python-gnome2.
Hence I was thinking that it would be awesome if we could package FAHClient, FAHViewer, and FAHControl into a snap based on the 18.04 stack.
Just I’m not sure if it’s possible to do so from a machine with 20.04, is it?
P.S: I’m not sure if the FAHClient is actually open source and even redistributable…
Update
You can try and test the snap:
Please, try the channel edge: snap install folding-at-home-fcole90 --edge snap connect folding-at-home-fcole90:hardware-observe
I see that you referenced a GTK2 tutorial, but in your code you are not using the suggested plugs, which likely the first reason for why it is not working when confined
@ogra@mborzecki I found an old discussion where you were discussing how to handle the OpenCL issue. Is there any new and improved way to do this today?
$ snap run --shell trigger-rally-ogra
$ cat /etc/OpenCL/vendors/nvidia.icd
libnvidia-opencl.so.1
$ ls /var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1
/var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.1
so if /var/lib/snapd/hostfs/usr/lib/x86_64-linux-gnu/ is in your LD_LIBRARY_PATH it might actually work … (not sure if this is actually enough though, the lib might need additional device access that isnt covered in opengl yet)
You can now try it with snap install folding-at-home-fcole90 --edge.
Online at https://snapcraft.io/folding-at-home-fcole90
I didn’t want to register it with the plain name so I can later ask FAH if they want to.
What works (at least partially):
FAHControl, the interface, loads correctly and can be launched with its desktop file.
FAHClient is loaded as simple daemon, so that FAHControl can connect to it. I got a fold job and it started folding on the CPU
this seems to look for an unversioned libOpenCL.so … but the ocl-icd-libopencl1 you ship in stage-packages only provides libOpenCL.so.1 and libOpenCL.so.1.0.0 … i guess just adding an additional symlink (from an override-prime: directive) so that libOpenCL.so points to libOpenCL.so.1 in usr/lib/$SNAPCRAFT_ARCH_TRIPLET might be enough …
override-prime: |
snapcraftctl prime
ln -s $SNAPCRAFT_PRIME/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libOpenCL.so.1 $SNAPCRAFT_PRIME/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libOpenCL.so
I built it from the launchpad service but I couldn’t release it because of the following error:
Error:package contains external symlinks: usr/lib/x86_64-linux-gnu/libOpenCL.so
It looks like the $SNAPCRAFT_PRIME variable was empty