Skip to content

Instantly share code, notes, and snippets.

@aniline
Last active December 19, 2018 14:49
Show Gist options
  • Save aniline/2102432a27cc83330b39c3d56c60c779 to your computer and use it in GitHub Desktop.
Save aniline/2102432a27cc83330b39c3d56c60c779 to your computer and use it in GitHub Desktop.
Nvidia docker runtime setup for CUDA images

Manual setup of nvidia-docker

To not use the pre-bundled images or .deb-s.

Runtime

  • Checkout (opencontainers/runc) from hash id’d from nvidia-container-runtime/runtime/runc and the nvidia-container-runtime/runtime/Makefile.
  • Patch (runc) with patch from directory matching the commit hash.
  • Build runc, and cp/rename it to nvidia-container-runtime (needs BSD make: bmake).
  • cp (runc) nvidia-container-runtime /usr/local/bin

Hook

  • Merge (nvidia-docker) docker/daemon.conf with system’s.
  • Copy config.toml.debian to /etc/nvidia-container-runtime/config.toml
  • Build and cp (nvidia-container-runtime/hook/nvidia-container-runtime-hook/) nvidia-container-runtime-hook /usr/local/bin

libnvidia-container

  • Make install on libnvidia-container (needed libseccomp-dev)

Notes

My machine is too old for tensorflow/tensorflow:latest-gpu, :1.5.0-gpu appears to work. libtensorflow_framework.so hits an illegal instruction on newer ones.

Repos and req.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment