Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.
jason edited this page Mar 3, 2022 · 6 revisions

HOME | Biocontainer Compatibility Report | Package Installation Benchmark | GPGPU Access | Containerize Canu Assembler | Composability Feature | Developer Notice | Incompatible Images

GPGPU Access

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

  1. 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) host
  2. Run guppy basecaller with real data (small sized data) in the host ,the guppy basecaller version is v3.4.5 basecaller_host
  3. 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. basecaller_lpmx

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.

Clone this wiki locally