Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a docker image #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frankcarey
Copy link

@frankcarey frankcarey commented Dec 30, 2016

  • Creates an Ubuntu 14.04, tightvnc, bazel image with all the dependencies for
    building and running lab.
  • Does an initial compile using
    'bazel build :deepmind_lab.so --define headless=osmesa'
  • Run headless with
    'bazel run :random_agent --define headless=osmesa'

Issues:

@abridgland
Copy link

I just tried adding these 3 files to the /lab directory and running docker build -t dmlab . which all seemed to work fine but when I run docker run dmlab I get the following:

container_linux.go:247: starting container process caused "exec: \"/opt/vnc.sh\": permission denied"
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/opt/vnc.sh\\\": permission denied\"\n".

I could be missing something simple but thanks for any help and thanks for putting this together!

Frank Carey added 2 commits February 9, 2017 03:42
* Creates an Ubuntu 14.04, tightvnc, bazel image with all the dependencies for
  building and running lab.
* Does an initial compile using
  'bazel build :deepmind_lab.so --define headless=osmesa'
* Run headless with
  'bazel run :random_agent --define headless=osmesa'

Issues:
* OpenGL currently doesn't work properly for some reason, so running
  the non-headless version doesn't work. See
  https://ubuntuforums.org/archive/index.php/t-2257096.html
* After much debugging, it seems xvfb (virtual frame buffer) needed to be
  implemented to get opengl working properly.
* Switched to using our own from-stratch Dockerfile based on Ubuntu 14.04
* Switched to x11vnc instead of tightvnc since tightvnc didn't seem to work,
  but not sure if that's still an issue or not.
* Added lots of documentation around the various settings used.
* Using fluxbox instead of lxdm because it was lighter weight.
@frankcarey
Copy link
Author

frankcarey commented Feb 9, 2017

@bridgo Your issue was indeed a bug with the permissions of the vnc.sh file.

I have this actually working well right now. Seems the issue was that there wasn't a proper display. I needed to use xvfb (virtual/dummy frame buffer) and then tools like glxinfo worked properly. It can now run headless=false .. even though it's effectively running headless (no monitors) because of xvfb. However if you VNC into the container and run a bazel build, you'll see it on the screen as well.

Lots of cleanup of the Dockerfile and script as well... I worked on this way too late. If someone wanted to try it out you'll want to do something like:

  1. docker build -t deepmind-lab . to build the image. Takes about 10-15 minutes on my machine, generating an image over 2 GB (it's a large repo)

  2. docker run -dP deepmind-lab to actually run the container, which will start a VNC server. (check docker ps to see which port you should connect on)

  3. On OSX I can easily connect using vnc://$DOCKER_IP:$VNC_PORT and then entering the default password of password

  4. Then if I want to run some builds inside the container, I can get a prompt with docker exec -it $DOCKER_CONTAINER_ID bash and then run bazel run :random_agent --define headless=false I should see lab running in my VNC.

Example of what you should see:
screen shot 2017-02-09 at 2 59 41 am

@frankcarey frankcarey changed the title * Creates an Ubuntu 14.04, tightvnc, bazel image with all the depende… Create a docker image Apr 2, 2017
@theamazingfedex
Copy link

theamazingfedex commented Apr 8, 2017

I put all three files in the same directory and ran docker build -t deeplab and when I get to the end of the install script, I get the following error:

The 'run' command is only supported from within a workspace.
The command '/bin/sh -c bazel run :python_module_test --define headless=osmesa' returned a non-zero code: 2

Also, trying docker run deeplab doesn't work at this point, saying it doesn't exist.

edit: I am running the commands in an ubuntu 17.04 vm, on a windows 7 computer.

@tgangwani
Copy link

Thanks for the scripts. Is there a way to control the size of the lab screen inside VNC? The default is quite small.

@tkoeppe tkoeppe force-pushed the master branch 2 times, most recently from 31fe629 to 87f8993 Compare December 5, 2017 16:44
libsdl2-dev \
libosmesa6-dev \
python-dev \
python-numpy \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably add python-pil, now that we sort of depend on it.

@YigitDemirag
Copy link

Currently build does not complete. Similar to #106.

@ryanprinster
Copy link

I'm also trying to use this docker image, and this does not build. Has anyone managed to get a modified version to build?

@andyljones
Copy link

andyljones commented Apr 21, 2019

@ryanprinster I've got a modified version of this to build. Instructions are in the commit message. Seems to work ok, but will wait till I've fully exercised it before submitting a PR.

e: A few hours later, I've found that scalable_agents has a Dockerfile that works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants