Name: libnvidia-container
Owner: NVIDIA Corporation
Description: NVIDIA container runtime library
Created: 2017-04-14 23:45:54.0
Updated: 2018-04-02 15:28:17.0
Pushed: 2018-03-29 17:31:43.0
Homepage: null
Size: 5604
Language: C
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository provides a library and a simple CLI utility to automatically configure GNU/Linux containers leveraging NVIDIA hardware.\ The implementation relies on kernel primitives and is designed to be agnostic of the container runtime.
Refer to the repository configuration for your Linux distribution.
With Docker:
nerate packages for a given distribution in the dist/ directory
docker-ubuntu:16.04 TAG=rc.1
Without Docker:
install
ternatively in order to customize the installation paths
DIR=/path/to/root make install prefix=/usr
Refer to the nvidia-container-runtime project.
tup a rootfs based on Ubuntu 16.04 inside new namespaces
(mktemp -d) && mkdir rootfs
unshare --mount --pid --fork
http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-amd64.tar.gz | tar -C rootfs -xz
add -R $(realpath rootfs) -U -u 1000 -s /bin/bash nvidia
t --bind rootfs rootfs
t --make-private rootfs
ootfs
unt standard filesystems
t -t proc none proc
t -t sysfs none sys
t -t tmpfs none tmp
t -t tmpfs none run
olate the first GPU device along with basic utilities
ia-container-cli --load-kmods configure --no-cgroups --utility --device 0 .
ange into the new rootfs
t_root . mnt
nt -l mnt
chroot --userspec 1000:1000 . env -i bash
n nvidia-smi from within the container
ia-smi -L
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.
A signed copy of the Contributor License Agreement needs to be provided to digits@nvidia.com before any change can be accepted.