Skip to content

Commit

Permalink
Single Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-northcutt committed Jun 13, 2017
1 parent b911f95 commit 54054f2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 30 deletions.
24 changes: 17 additions & 7 deletions drake/doc/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Getting Started
Docker containers have emerged as a solution to running code or services in a
way that is isolated from the host operating system. This allows code to be
run/compiled with conflicting dependencies from those of the host operating
system while also isolating these executables from the host filesystem.
system while also isolating these executables from the host file system.
Docker is available for all major operating systems. Please see Docker's
`Getting Started <https://docs.docker.com/get-started/>`_ for basic information
on Docker.
Expand All @@ -35,14 +35,19 @@ Building
::

$ cd <drake-distro>
$ docker build -t drake -f setup/docker/Dockerfile .

If you have the Nvidia drivers installed:::
If successful::

$ docker build -t drake -f setup/docker/Dockerfile.nvidia .
$ drake images

If you are using open source graphics drivers (Nouveau, Intel, ...):::
should show an image named drake.

$ docker build -t drake -f setup/docker/Dockerfile.opensource .
Note:::

$ drake ps

will show any running drake containers on your system.

.. _docker_running:

Expand All @@ -56,8 +61,13 @@ Passive Acrobot Simulation

.. _docker_running_simulation_nvidia:

Nvidia drivers: (requires nvidia-docker plugin)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nvidia drivers:
~~~~~~~~~~~~~~~
The `nvidia-docker <https://github.com/NVIDIA/nvidia-docker/>`_ plugin is
required in order to pass X drawing commands to your host system when the
proprietary Nvidia GPU drivers are installed.


::

$ xhost +local:root; nvidia-docker run -ti --rm -e DISPLAY \
Expand Down
File renamed without changes.
19 changes: 0 additions & 19 deletions setup/docker/Dockerfile.opensource

This file was deleted.

9 changes: 5 additions & 4 deletions setup/docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash
set -e
set -e -u
[[ $# -eq 0 ]] && {
cd /drake/build/install/bin
#Needed until bazel build produces a drake-visualizer
cd /drake-distro/build/install/bin
./drake-visualizer &
sleep 3
cd /drake/build/drake/examples/Acrobot
./acrobot_run_passive
cd /drake-distro
bazel run //drake/examples/Acrobot:acrobot_run_passive
} || {
eval "$@"
}

0 comments on commit 54054f2

Please sign in to comment.