Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

# nvdocker

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 - Install nvidia-docker

> https://github.com/NVIDIA/nvidia-docker#quickstart

  • Install nvdocker

` pip install nvdocker `

## Usage

These variables are already set in NVIDIA’s [official CUDA images](https://hub.docker.com/r/nvidia/cuda/).

### 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.

#### NVIDIA_DISABLE_REQUIRE Single switch to disable all the constraints of the form NVIDIA_REQUIRE_*.

#### NVIDIA_REQUIRE_CUDA

The version of the CUDA toolkit used by the container. It is an instance of the generic NVIDIA_REQUIRE_* case and it is set by official CUDA images. 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_VERSION 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.

## Copyright and License

This project is released under the [UIUC/NCSA License](https://github.com/acm-uiuc/nvdocker/blob/masterLICENSE). `docker-py` is licensed under the [Apache License 2.0](https://github.com/docker/docker-py/blob/master/LICENSE). nvidia-docker and nvidia-container-runtime are licensed under the [BSD 3-clause license](https://github.com/NVIDIA/nvidia-container-runtime/blob/master/LICENSE).

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.2a1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvdocker-0.0.2a1-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: nvdocker-0.0.2a1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nvdocker-0.0.2a1.tar.gz
Algorithm Hash digest
SHA256 9a61fd973857ad352754514f1748f982ffb1f10714fe612083e97d114360443e
MD5 33a615d534735b4e4e1903db491bd576
BLAKE2b-256 c73d7cf2c8b4e89cd9e3e6ab7b73497eb1a29ec60d0b39a867df2acd5abf7aa6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nvdocker-0.0.2a1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 40bd82f77d36acba2406d5cc6e2ce2bdeb956ec3789489838ba95036f5a630e9
MD5 92a377f2f9fa8b4af30952775a04b712
BLAKE2b-256 d76a13af61a24dd9b189b6a605b99091a8a2e7013b8af09a25d026478c5d1523

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2a1 This release

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page