Felix Abecassis, Systems Software Engineer
Jonathan Calmels, Systems Software Engineer
USING DOCKER FOR GPU
ACCELERATED APPLICATIONS
2
AGENDA
GPU COMPUTING
CUDA
Ecosystem
Applications
NVIDIA DOCKER
Challenges
Our Solution
DEMOS
GPU Isolation
Machine Learning
Remote Deployment
3
GPU COMPUTING
nvidia.com/object/gpu-accelerated-computing.html
4
HETEROGENEOUS COMPUTING
GPU CPU
+
Optimized for
parallel tasks
Optimized for
serial tasks
5
// Vector sum in C
void vector_add(int n, const float* a, const float* b, float* c)
{
for (int idx = 0; idx < n; ++idx)
c[idx] = a[idx] + b[idx];
}
// Vector sum in CUDA
__global__ void vector_add(int n, const float* a, const float* b, float* c)
{
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < n)
c[idx] = a[idx] + b[idx];
}
CUDA C++ PROGRAMMING
6
ECOSYSTEM
AmgX cuBLAS
LIBRARIES
COMPILER DIRECTIVES
PROGRAMMING LANGUAGES
x86
7
NVIDIA SDKs
8
APPLICATIONS: DEEP LEARNING
INTERNET & CLOUD
Image Classification
Speech Recognition
Language Translation
Language Processing
Sentiment Analysis
Recommendation
MEDICINE & BIOLOGY
Cancer Cell Detection
Diabetic Grading
Drug Discovery
MEDIA &
ENTERTAINMENT
Video Captioning
Video Search
Real Time Translation
SECURITY & DEFENSE
Face Detection
Video Surveillance
Satellite Imagery
AUTONOMOUS
MACHINES
Pedestrian Detection
Lane Tracking
Recognize Traffic Sign
9
GPU-ACCELERATED DEEP LEARNING
TENSORFLOW CNTK TORCH CAFFE
WATSON CHAINER THEANO MATCONVNET
10
NVIDIA DOCKER
github.com/NVIDIA/nvidia-docker
11
CHALLENGES
A Typical Cluster
Ubuntu 14.04
Drivers 352
4x Maxwell
CentOS 7
Drivers 346
4x Kepler
Ubuntu 16.04
Drivers 362
8x Pascal
CUDA 7.5
CUDA 7.0
cuDNN 3
CUDA 7.5
cuDNN 4
CUDA 8.0
Patches
12
PACKAGING DRIVER FILES?
FROM ubuntu:14.04
RUN apt-get update && 
apt-get install --no-install-recommends -y gcc make libc-dev wget
RUN wget http://us.download.nvidia.com/XFree86/Linux-
x86_64/361.42/NVIDIA- Linux-x86_64-361.42.run
RUN sh NVIDIA-Linux-x86_64-361.42.run --silent --no-kernel-module
Never install the driver in the Dockerfile, not portable!
13
BRINGING GPU SUPPORT TO DOCKER
14
INTERNALS
Docker Daemon
NVIDIA Docker Plugin
NVIDIA Drivers
NVIDIA Docker
Docker Registry
1
2
3
4
5
6
HTTP + SSH
HTTP + UNIX
LDCACHE + NVML
HTTPS
CUDA 8.0
CAFFE
CUDA 7.5
TENSORFLOW
HTTPS
HTTPSDocker CLI
15
DOCKERHUB IMAGES
CUDA 7.0
runtime
CUDA 7.5
runtime
CUDA 8.0
runtime
cuDNN v4
runtime
CUDA 7.0
devel
cuDNN v4
runtime
CUDA 7.5
devel
cuDNN v5
runtime
CUDA 8.0
devel
NVIDIA/Caffe
0.14.2
cuDNN v4
devel
cuDNN v4
devel
NVIDIA/Caffe
0.14.5
cuDNN v5
devel
DIGITS
3.0
CNTK BVLC/Caffe TensorFlow
DIGITS
3.3
Ubuntu
14.04
Ubuntu
16.04
16
GPU APPLICATIONS WORKFLOW
Research/Develop Test/Package Deploy
Video
Transcoding
Image
Processing
Deep
Learning HPC
Visualization
Container Based Applications GPU-Accelerated Data Center
17
LEARN MORE
www.nvidia.com/dgx1
THANK YOU

Using Docker for GPU Accelerated Applications