Tensorflow GPU, CUDA, CuDNN, Keras, Caffe, Torch, Jupyter Notebook, ROS Indigo and Autoware
3.1K
Join us in building DIY Open Source Self Driving Cars at http://ossdc.org
Docker instance with Tensorflow GPU on Ubuntu 14.04 and ROS Indigo for Udacity Self Driving Car (SDC) challenges, was originally based on floydhub/dl-docker:gpu.
It works even on machines without a supported GPU (NVidia GPU with CUDA >= compute level 3) but much slower!
Change history:
For more details and updates check https://github.com/OSSDC/OSSDC-VisionBasedACC and https://github.com/OSSDC/OSSDC-Hacking-Book
Instruction on how to use it can also be found here:
https://github.com/gtarobotics/self-driving-car
Create a folder sharefolder that will be used to access data and code from host: mkdir ~/sharefolder
To run the image use the following commands:
Install nvidia-docker from (for GPU mode only, for CPU mode you don't need it):
https://github.com/NVIDIA/nvidia-docker
sudo nvidia-docker run --rm nvidia/cuda nvidia-smi
Then run the commands:
For GPU mode run: sudo xhost + sudo nvidia-docker run --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" -env="QT_X11_NO_MITSHM=1" -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix:ro -it -p 8888:8888 -p 6006:6006 -v ~/sharefolder:/sharefolder:shared gtarobotics/udacity-sdc bash
For CPU mode run (no need to install nvidia-docker): sudo xhost + sudo docker run --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" -env="QT_X11_NO_MITSHM=1" -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix:ro -it -p 8888:8888 -p 6006:6006 -v ~/sharefolder:/sharefolder:shared gtarobotics/udacity-sdc bash
In sharefolder you can copy data sets and code or link folders like this (while in the host, not in the container):
cd ~/sharefolder/ mkdir sdc-data #this will be the root of SDC data sudo mount --bind /path_to_root_folder_with_datasets/ sdc-data
To test a nice CNN in Tensorflow do (while you are in docker container):
cd /sharefolder git clone https://github.com/SullyChen/Nvidia-Autopilot-TensorFlow cd Nvidia-Autopilot-TensorFlow
Download the dataset and extract into Nvidia-Autopilot-TensorFlow folder (it will create driving_dataset folder): https://drive.google.com/file/d/0B-KJCaaF7ellQUkzdkpsQkloenM/view?usp=sharing
python3 train.py
when done (could take a few hours depending on your GPU) do:
python3 run_dataset.py
and you'll be impressed :-)
cd ./run_jupyter.sh
Then load a Jupyter Notebook open this page in the browser: http://your_docker_host_machine_ip:8888/
cd ./run_autoware.sh
docker pull gtarobotics/udacity-sdc:latest