Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Commit

Permalink
update docker instructions to check EGL on host (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Nov 18, 2018
1 parent 8623296 commit b59f38b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
15 changes: 10 additions & 5 deletions INSTRUCTION.md
Expand Up @@ -27,18 +27,23 @@ House3D runs on Linux/MacOS with or without Nvidia GPUs.

### Use Dockerfile:
If you're on a Linux with Nvidia GPUs,
we recommend trying the [Dockerfile](Dockerfile) to run House3D,
so you don't have to worry about the build process. To use the docker file, you need to have
`nvidia-docker`, then run:
we recommend using the [Dockerfile](Dockerfile) to run House3D,
so you don't have to worry about the build process.
To use the docker file, you need to install `nvidia-docker`, then run:

```bash
# If this command cannot find `libEGL_nvidia`, your driver installation is incomplete.
nvidia-container-cli list -l | grep libEGL_nvidia
# Build the docker
docker build -t house3d:v0 .
xhost local:root # run this command only if you need to use GUI within docker
# Run this command only if you need to use GUI within docker
xhost local:root
# Start the container
nvidia-docker run -it --name house3d --net=host \
--env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
house3d:v0
# the "env" and "volume" options are only useful if you need to use GUI within docker
# Now you should be inside the docker and House3D is ready to use. You can:
# Now you should be inside the container and House3D is ready to use. You can:

cd /House3D/renderer && ./objview-offline.bin $TEST_HOUSE # offline rendering, produce an image file
cd /House3D/tests && python3 test-rendering.py $TEST_HOUSE --interactive # interactive rendering with GUI
Expand Down
9 changes: 6 additions & 3 deletions renderer/DEPENDENCIES.md
Expand Up @@ -9,6 +9,9 @@ In a nutshell, you need the following libraries:
+ libglvnd (needed on certain systems)

The way to install these dependencies is different on various platforms.
For people not familiar enough with Linux, they are not easy to install manually.
That's why we recommend using docker to avoid the build process.

These are some platforms we've tested on:

### Ubuntu 16.04
Expand Down Expand Up @@ -49,7 +52,7 @@ yum install libX11-devel glfw-devel glm-devel mesa-libGL-devel mesa-libEGL-devel
Install libglvnd the same way as above.

### Ubuntu 14.04 with Nvidia GPU
```
```bash
apt install libx11-dev libegl1-mesa-dev libpng-dev libjpeg-dev
```

Expand All @@ -76,13 +79,13 @@ Later, remember to compile the renderer with `INCLUDE_DIR=-I/path/to/INSTALL_DIR

Install EGL headers (the headers in apt is too old):
```
cd INSTALL_DIR
cd SOME/INSTALL_DIR
wget -P EGL https://www.khronos.org/registry/EGL/api/EGL/egl.h
wget -P EGL https://www.khronos.org/registry/EGL/api/EGL/eglext.h
wget -P EGL https://www.khronos.org/registry/EGL/api/EGL/eglplatform.h
```
Later, remember to compile `INCLUDE_DIR=-I/path/to/INSTALL_DIR make`.

If multiple `INCLUDE_DIR` need to be added, use `INCLUDE_DIR=-I/path/one -I/path/two`.
If multiple `INCLUDE_DIR` need to be added, use `INCLUDE_DIR="-I/path/one -I/path/two"`.

Install libglvnd the same way as above.

0 comments on commit b59f38b

Please sign in to comment.