Skip to main content

nvdocker is library built on top of the docker-py python sdk to build and run docker containers using nvidia-docker. Targets nvidia-docker2

Project description

nvdocker is library built on top of the docker-py python sdk to build and run docker containers using nvidia-docker.

Targets nvidia-docker2

Installation

pip install nvdocker

Usage

These variables are already set in NVIDIA’s official CUDA images.

visible_devices

This variable controls which GPUs will be made accessible inside the container.

  • Possible values:

    • 0,1,2, GPU-fef8089b …: a comma-separated list of GPU UUID(s) or index(es),

    • all: all GPUs will be accessible, this is the default value in our container images,

    • none: no GPU will be accessible, but driver capabilities will be enabled.

    • void or empty or unset: nvidia-container-runtime will have the same behavior as runc.

driver_capabilites

This option controls which driver libraries/binaries will be mounted inside the container.

  • Possible values

    • compute,video,graphics,utility …: a comma-separated list of driver features the container needs,

    • all: enable all available driver capabilities.

    • empty or unset: use default driver capability: utility.

  • Supported driver capabilities

    • compute: required for CUDA and OpenCL applications,

    • compat32: required for running 32-bit applications,

    • graphics: required for running OpenGL and Vulkan applications,

    • utility: required for using nvidia-smi and NVML,

    • video: required for using the Video Codec SDK.

require

A logical expression to define constraints on the configurations supported by the container.

  • Supported constraints

    • cuda: constraint on the CUDA driver version,

    • driver: constraint on the driver version,

    • arch: constraint on the compute architectures of the selected GPUs.

Expressions

Multiple constraints can be expressed in a single environment variable: space-separated constraints are ORed, comma-separated constraints are ANDed.
Multiple environment variables of the form rew are ANDed together.

cuda

The version of the CUDA toolkit used by the container. If the version of the NVIDIA driver is insufficient to run this version of CUDA, the container will not be started.

Possible values
  • cuda>=7.5, cuda>=8.0, cuda>=9.0 …: any valid CUDA version in the form major.minor.

cuda_vesion

Similar to NVIDIA_REQUIRE_CUDA, for legacy CUDA images.
In addition, if NVIDIA_REQUIRE_CUDA is not set, NVIDIA_VISIBLE_DEVICES and NVIDIA_DRIVER_CAPABILITIES will default to all.

disable_require

Single switch to disable all the constraints of the form

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nvdocker-0.0.2a5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

nvdocker-0.0.2a5-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nvdocker-0.0.2a5.tar.gz.

File metadata

  • Download URL: nvdocker-0.0.2a5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

File hashes

Hashes for nvdocker-0.0.2a5.tar.gz
Algorithm Hash digest
SHA256 61c70666fd0d5cef651c69571636f51d734cf8b54d2a88963c9363c1bb38ecba
MD5 602b1634b2633919e6f8f4ee98206a66
BLAKE2b-256 9db541d7ae4faf64ac69b7f11fcd235cf68fda92a4eab3bb3c73d6f4584823ed

See more details on using hashes here.

File details

Details for the file nvdocker-0.0.2a5-py2.py3-none-any.whl.

File metadata

  • Download URL: nvdocker-0.0.2a5-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

File hashes

Hashes for nvdocker-0.0.2a5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 565d6951e82e918b3e3ea34e1f3bce2a6b8bb1e230c0efe0dec863d3ebcafdb8
MD5 15f8cafbb8928d06205cd4e5a014c892
BLAKE2b-256 363783abf8de3d10775ae4355ce51eb5fd3b65f2ec7261d13e4353aacc5b08d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page