Giter Site home page Giter Site logo

nvdocker's Introduction

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

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

Copyright and License

This project is released under the UIUC/NCSA License.

docker-py is licensed under the Apache License 2.0.

nvidia-docker and nvidia-container-runtime are licensed under the BSD 3-clause license.

nvdocker's People

Contributors

ezhang887 avatar narendasan avatar therishidesai avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvdocker's Issues

Update the interface

They changed the API again as GPUs have been integrated into docker upstream, either this package isnt needed anymore (check if docker-py supports gpus) or this package needs to be updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.