Skip to content

Commit 69bbffe

Browse files
committed
merge two dockerfiles
1 parent 192ee5b commit 69bbffe

File tree

3 files changed

+17
-148
lines changed

3 files changed

+17
-148
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# docker build -t gibson .
44
# docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix gibson
55

6-
FROM nvidia/cudagl:9.0-base-ubuntu16.04
6+
FROM nvidia/cudagl:9.0-runtime-ubuntu16.04
77

88
RUN apt-get update && apt-get install -y --no-install-recommends \
99
cuda-samples-$CUDA_PKG_VERSION && \

Dockerfile_server

-130
This file was deleted.

README.md

+16-17
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ We use docker to distribute our software, you need to install [docker](https://d
8686

8787
Run `docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi` to verify your installation.
8888

89-
You can either 1. build your own docker image or 2. pull from our docker image.
89+
You can either 1. pull from our docker image or 2. build your own docker image.
9090

91-
1. Build your own docker image (recommended)
91+
92+
1. Pull from our docker image (recommended)
93+
```bash
94+
docker pull xf1280/gibson:0.3.1
95+
```
96+
97+
2. Build your own docker image
9298
```bash
9399
git clone https://github.com/StanfordVL/GibsonEnv.git
94100
cd GibsonEnv
@@ -99,27 +105,20 @@ If the installation is successful, you should be able to run `docker run --runti
99105
dataset files in docker image to keep our image slim, so you will need to mount it to the container when you start a container.
100106

101107

102-
2. Or pull from our docker image
103-
```bash
104-
docker pull xf1280/gibson:0.3.1
105-
```
106108
#### Notes on deployment on a headless server
107109

108-
We have another docker file that supports deployment on a headless server and remote access with TurboVNC+virtualGL.
109-
You can build your own docker image with the docker file `Dockerfile_server`.
110+
Gibson Env supports deployment on a headless server and remote access with `x11vnc`.
111+
You can build your own docker image with the docker file `Dockerfile` as above.
110112
Instructions to run gibson on a headless server (requires X server running):
111113

112-
1. Install nvidia-docker2 dependencies following the starter guide.
113-
2. Use `openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem` create `self.pem` file
114-
3. `docker build -f Dockerfile_server -t gibson_server .` use the `Dockerfile_server` to build a new docker image that support virtualgl and turbovnc
115-
4. `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset -p 5901:5901 gibson_server`
116-
in docker terminal, start `/opt/websockify/run 5901 --web=/opt/noVNC --wrap-mode=ignore -- vncserver :1 -securitytypes otp -otp -noxstartup` in background, potentially with `tmux`
117-
5. Run gibson with `DISPLAY=:1 vglrun python <gibson example or training>`
118-
6. Visit your `host:5901` and type in one time password to see the GUI.
114+
1. Install nvidia-docker2 dependencies following the starter guide. Install `x11vnc` with `sudo apt-get install x11vnc`.
115+
2. Have xserver running on your host machine, and run `x11vnc` on DISPLAY :0.
116+
2. `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix/X0:/tmp/.X11-unix/X0 -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset <gibson image name>`
117+
5. Run gibson with `python <gibson example or training>` inside docker.
118+
6. Visit your `host:5900` and you should be able to see the GUI.
119119

120120
If you don't have X server running, you can still run gibson, see [this guide](https://github.com/StanfordVL/GibsonEnv/wiki/Running-GibsonEnv-on-headless-server) for more details.
121121

122-
123122
B. Building from source
124123
-----
125124
If you don't want to use our docker image, you can also install gibson locally. This will require some dependencies to be installed.
@@ -168,7 +167,7 @@ Uninstall gibson is easy. If you installed with docker, just run `docker images
168167
Quick Start
169168
=================
170169

171-
First run `xhost +local:root` on your host machine to enable display. You may need to run `export DISPLAY=:0.0` first. After getting into the docker container with `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson`, you will get an interactive shell. Now you can run a few demos.
170+
First run `xhost +local:root` on your host machine to enable display. You may need to run `export DISPLAY=:0` first. After getting into the docker container with `docker run --runtime=nvidia -ti --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v <host path to dataset folder>:/root/mount/gibson/gibson/assets/dataset gibson`, you will get an interactive shell. Now you can run a few demos.
172171

173172
If you installed from source, you can run those directly using the following commands without using docker.
174173

0 commit comments

Comments
 (0)