lab
lab copied to clipboard
Create a docker image
- 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
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!
@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:
-
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) -
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) -
On OSX I can easily connect using
vnc://$DOCKER_IP:$VNC_PORT
and then entering the default password ofpassword
-
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 runbazel run :random_agent --define headless=false
I should see lab running in my VNC.
Example of what you should see:
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.
Thanks for the scripts. Is there a way to control the size of the lab screen inside VNC? The default is quite small.
Currently build does not complete. Similar to #106.
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 ~~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.