资源算法libnvidia-container

libnvidia-container

2019-12-23 | |  41 |   0 |   0

Installing the library

From packages

Configure the package repository for your Linux distribution.

Install the packages:

libnvidia-container1
libnvidia-container-tools

From sources

With Docker:

# Generate docker images for a supported <os><version>make {ubuntu18.04, ubuntu16.04, debian10, debian9, centos7, amazonlinux1, amazonlinux2, opensuse-leap15.1}# Or generate docker images for all supported distributions in the dist/ directorymake docker

The resulting images have the name nvidia/libnvidia-container/<os>:<version>

Without Docker:

make install# Alternatively in order to customize the installation pathsDESTDIR=/path/to/root make install prefix=/usr

Using the library

Container runtime example

Refer to the nvidia-container-runtime project.

Command line example

# Setup a new set of namespacescd $(mktemp -d) && mkdir rootfs
sudo unshare --mount --pid --fork# Setup a rootfs based on Ubuntu 16.04 inside the new namespacescurl http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-amd64.tar.gz | tar -C rootfs -xz
useradd -R $(realpath rootfs) -U -u 1000 -s /bin/bash nvidia
mount --bind rootfs rootfs
mount --make-private rootfscd rootfs# Mount standard filesystemsmount -t proc none proc
mount -t sysfs none sys
mount -t tmpfs none tmp
mount -t tmpfs none run# Isolate the first GPU device along with basic utilitiesnvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --no-cgroups --utility --device 0 $(pwd)# Change into the new rootfspivot_root . mnt
umount -l mntexec chroot --userspec 1000:1000 . env -i bash# Run nvidia-smi from within the containernvidia-smi -L

Copyright and License

This project is released under the BSD 3-clause license.

Additionally, this project can be dynamically linked with libelf from the elfutils package (https://sourceware.org/elfutils), in which case additional terms apply.
Refer to NOTICE for more information.

Issues and Contributing

Checkout the Contributing document!


上一篇:hpc-container-maker

下一篇:vdisc

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • shih-styletransfer

    shih-styletransfer Code from Style Transfer ...