This container contains CNTK, TensorFlow, and Keras. When Keras is run in the container, CNTK will be the selected backend by default. Only recommended to run on a GPU instance.
To set up the CUDA+container drivers from scratch on the GPU instance, run these commands:
curl -O -s https://raw.githubusercontent.com/minimaxir/keras-cntk-docker/master/deps_nvidia_docker.sh sudo sh deps_nvidia_docker.sh
You may need to run the script again after a few days (due to a GPU update on host hardware)
To run a deep learning script in the container:
sudo nvidia-docker run -it --rm -v $(pwd)/:/keras --name keras minimaxir/keras-cntk python3 <x>.py
<x> is the Python script on the host server.
To run TensorFlow on Keras in the container instead of CNTK, add a
-e KERAS_BACKEND='tensorflow' flag:
sudo nvidia-docker run -it --rm -v $(pwd)/:/keras --name keras -e KERAS_BACKEND='tensorflow' minimaxir/keras-cntk python3 <x>.py
Max Woolf (@minimaxir)
Max's open-source projects are supported by his Patreon. If you found this project helpful, any monetary contributions to the Patreon are appreciated and will be put to good creative use.
deps_nvidia_docker.sh sourced from Durgesh Mankekar's blog post noted above. (reproduced here for postertity)