-
Notifications
You must be signed in to change notification settings - Fork 6
GPGPU
HOME | Biocontainer Compatibility Report | Package Installation Benchmark | GPGPU Access | Containerize Canu Assembler | Composability Feature | Developer Notice | Incompatible Images
LPMX provides end-users an easy way to access hardware resources such as GPGPU. Technically speaking, LPMX uses LD_PRELOAD hack to filter and manipulate system calls requested by processes, therefore, it is very easy to allow processes to get access to hardware resources, for example, by default the /dev and /sys mounts in the host are mapped into containers so that any processes isolated by LPMX still can directly access these mounts without any settings.
However the most important thing is to load libraries from the host into the containers, to achieve this goal, we have to make sure the dynamic linker can search paths in the host so that libraries can be loaded via the dynamic linker inside the container.
To do this, end-users need to set an environment variable inside containers:
export FAKECHROOT_USE_SYS_LIB=true
The above command will allow the dynamic linker inside containers to search paths such as:
"/lib",
"/lib64",
"/lib/x86_64-linux-gnu",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib",
"/usr/local/lib",
"/usr/lib64",
"/usr/local/lib64"
in the host for libraries, if it still could not find the requested libraries, then an error will occur, besides, end-user can also modify the LD_LIBRARH_PATH environment variable inside containers to append customized locations.
**Notice: End-users have to make sure that the target software can correctly run using GPGPU in the host firstly, then by setting this environment variable inside LPMX, it should work as expected.
The following is an example of running nanopore guppy basecaller via GPGPU, for more information of what is guppy basecaller and related techs, please check nanopretech official website: https://nanoporetech.com/nanopore-sequencing-data-analysis
- Check the Nvidia information in the host, we have 2 x Nvidia 1080 GPU cards available, and our host OS is Scientific Linux release 6.7 (Carbon)
- Run guppy basecaller with real data (small sized data) in the host ,the guppy basecaller version is v3.4.5
- RUn the same guppy basecaller inside LPMX, notice that the first trial fails due to the lack of libcuda.so inside containers, as the container does not contain the cuda library. After set environment variable named "FAKECHROOT_USE_SYS_LIB", then guppy basecaller inside the container can correctly locate the libcuda library, after that, guppy basecaller can work as expected. The container uses Ubuntu 16.04 as its OS.
The above-animated figures show an example of using GPGPU inside LPMX. As by default /sys and /dev are included inside containers, so the only thing end-users have to handle is the library loading.
If you have any questions, please directly submit issue requests.