lab icon indicating copy to clipboard operation
lab copied to clipboard

Create a docker image

Open frankcarey opened this issue 8 years ago • 7 comments

  • 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

frankcarey avatar Dec 30 '16 18:12 frankcarey

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!

abridgland avatar Jan 17 '17 22:01 abridgland

@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 avatar Feb 09 '17 09:02 frankcarey

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.

theamazingfedex avatar Apr 08 '17 15:04 theamazingfedex

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

tgangwani avatar Apr 20 '17 01:04 tgangwani

Currently build does not complete. Similar to #106.

YigitDemirag avatar Sep 18 '18 11:09 YigitDemirag

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

ryanprinster avatar Oct 02 '18 20:10 ryanprinster

@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.

andyljones avatar Apr 21 '19 11:04 andyljones