|
1 | 1 | # DockerFile with Nvidia GPU support for TensorFlow and OpenCV
|
2 |
| -Revision: 20200423 |
| 2 | +Revision: 20200615 |
| 3 | + |
| 4 | +For TensorFlow GPU, you will need to build the `cudnn_` version. |
3 | 5 |
|
4 | 6 | The base OS for those container images is Ubuntu 18.04 or DockerHub's `nvidia/cuda` based on Ubuntu 18.04.
|
5 | 7 | More details on the Nvidia base images are available at https://hub.docker.com/r/nvidia/cuda/ .
|
6 | 8 | In particular, please note that "By downloading these images, you agree to the terms of the license agreements for NVIDIA software included in the images"; with further details on DockerHub version from https://docs.nvidia.com/cuda/eula/index.html#attachment-a
|
7 | 9 |
|
| 10 | +Version history: |
| 11 | +- `20191107`: builds a non-CUDA version: `tensorflow_opencv`. |
| 12 | +- `20191210`: builds a CuDNN version: `cudnn_tensorflow_opencv` |
| 13 | +- `20200211`: making use of Docker 19.03's GPU support and adding information about the OpenCV builds in the `OpenCV_BuildConf` directory. |
| 14 | +- `20200327`: added Protobuf, WebP, GStreamer and Eigen to the OpenCV build. |
| 15 | +- `20200423`: added support for OpenCV 3.4.10 and 4.3.0, and added GStreamer plugins to the build. Also added Nvidia Jetson Nano build steps in the `JetsonNano` directory. |
| 16 | +- `20200615`: TensorFlow is built from source. Note that TensorFlow will not have GPU support unless it was compiled with CUDNN support. |
8 | 17 |
|
9 |
| -As of the `20191107` Dockerfile version, it also builds a non-CUDA version: `tensorflow_opencv`. |
10 |
| - |
11 |
| -As of the `20191210` Dockerfile version, it also builds a CuDNN version: `cudnn_tensorflow_opencv` |
12 |
| - |
13 |
| -As of the `20200211` Dockerfile version, we are making use of Docker 19.03's GPU support and are adding information about the OpenCV builds in the `OpenCV_BuildConf` directory. |
14 |
| - |
15 |
| -As of the `20200327` Dockerfile version, we have added Protobuf, WebP, GStreamer and Eigen to the OpenCV build. |
16 |
| - |
17 |
| -As of the `20200423` Dockerfile version, we have added support for OpenCV 3.4.10 and 4.3.0, and added GStreamer plugins to the build. |
18 |
| -We have also added Nvidia Jetson Nano build steps in the `JetsonNano` directory. |
| 18 | +`tensorflow_opencv`: |
| 19 | +- Builds containers with TensorFlow and OpenCV. Also install, Jupyter, Keras, numpy, pandas and X11 support. |
| 20 | +- Can be used on systems without a Nvidia GPU, and the `runDocker.sh` script will setup proper X11 passthrough |
| 21 | +- for MacOS X11 passthrough, install the latest XQuartz server and activate the `Security -> Allow connections from network clients` (must logout for it to take effect) |
19 | 22 |
|
20 | 23 | `cuda_tensorflow_opencv`:
|
21 |
| -- Builds an Nvidia GPU optimized version of TensorFlow and OpenCV. Also install, Jupyter, Keras, numpy, pandas and X11 support. |
| 24 | +- Builds an Nvidia GPU optimized version of OpenCV. Also install, Jupyter, Keras, numpy, pandas and X11 support. |
| 25 | +- Note that TensorFlow need CUDNN for GPU support. |
22 | 26 | - Requires a Linux system with nvidia-docker (v2) and the Nvidia drivers installed to run. See https://github.com/NVIDIA/nvidia-docker for setup details
|
23 | 27 |
|
24 | 28 | `cudnn_tensorflow_opencv`:
|
25 |
| -- Similar to `cuda_tensorflow_opencv` but with CuDNN installed and used for OpenCV compilation (this was more deeply integrated within OpenCV after October 2019, see [CUDA backend for the DNN module](https://github.com/opencv/opencv/pull/14827) for additional details). |
26 |
| -- For CUDNN, the CUDA backend for DNN module requires CC 5.3 or higher; please see https://en.wikipedia.org/wiki/CUDA#GPUs_supported to confirm your architecture is supported |
27 |
| - |
28 |
| -`tensorflow_opencv`: |
29 |
| -- Builds a similar container with a version of TensorFlow and OpenCV. Also install, Jupyter, Keras, numpy, pandas and X11 support. |
30 |
| -- Can be used on systems without a Nvidia GPU, and the `runDocker.sh` script will setup proper X11 passthrough |
31 |
| -- for MacOS X11 passthrough, install the latest XQuartz server and activate the `Security -> Allow connections from network clients` (must logout for it to take effect) |
| 29 | +- Builds an Nvidia GPU optimized version of TensorFlow and OpenCV. Also install, Jupyter, Keras, numpy, pandas and X11 support. |
| 30 | +- As of the 20200615 version, both OpenCV and TensorFlow are compiled within the container. |
| 31 | +- OpenCV integrated additional CUDNN support after October 2019, see [CUDA backend for the DNN module](https://github.com/opencv/opencv/pull/14827). |
| 32 | +- For CUDNN, the CUDA backend for DNN module requires CC 5.3 or higher. |
32 | 33 |
|
33 | 34 | `jetsonnano-cuda_tensorflow_opencv` (see the `JetsonNano` directory):
|
34 | 35 | - Builds a Nvidia Jetson Nano `cuda_tensorflow_opencv` container image based on Nvidia's provided `l4t-base` container and adapted from the `Makefile` and `Dockerfile` used for the other builds.
|
35 | 36 |
|
36 |
| -**Docker Images built from this repository are publicly available at https://hub.docker.com/r/datamachines/tensorflow_opencv / https://hub.docker.com/r/datamachines/cuda_tensorflow_opencv / https://hub.docker.com/r/datamachines/cudnn_tensorflow_opencv / https://hub.docker.com/r/datamachines/jetsonnano-cuda_tensorflow_opencv . The [Builds-DockerHub.md](https://github.com/datamachines/cuda_tensorflow_opencv/blob/master/Builds-DockerHub.md) file is a quick way of seeing the list of pre-built container images** |
| 37 | +**Docker Images built from this repository are publicly available at https://hub.docker.com/r/datamachines/tensorflow_opencv / https://hub.docker.com/r/datamachines/cuda_tensorflow_opencv / https://hub.docker.com/r/datamachines/cudnn_tensorflow_opencv / https://hub.docker.com/r/datamachines/jetsonnano-cuda_tensorflow_opencv .** |
| 38 | + |
| 39 | +The [Builds-DockerHub.md](https://github.com/datamachines/cuda_tensorflow_opencv/blob/master/Builds-DockerHub.md) file is a quick way of seeing the list of pre-built container images. When available, a "BuiidInfo" will give the end user a deeper look of the capabilities of said container and installed version. In particular the compiled GPU architecture (see https://en.wikipedia.org/wiki/CUDA#GPUs_supported ). |
37 | 40 |
|
38 | 41 | It is possible to use those as `FROM` for your `Dockerfile`; for example: `FROM datamachines/cuda_tensorflow_opencv:10.2_1.15_3.4.8-20191210`
|
39 | 42 |
|
|
0 commit comments