Non Docker version
Hello, thank you for creating and releasing this environment and tasks.
Unfortunately our compute cluster does not allow the use of containers such as Docker. Is the source code for this environment available for compilation?
Hello, thanks for getting in touch!
Unfortunately we are not able to open-source the environment code.
Despite that, it may be possible to run dm_hard_eight without Docker, by following these two steps:
- extracting out the files from the Docker image, with commands such as:
mkdir dm_hard_eight_image
cd dm_hard_eight_image
DOCKER_ID=`docker run -d gcr.io/deepmind-environments/dm_hard_eight:v1.0.1`
sudo docker cp $DOCKER_ID:/ .
docker rm -f $DOCKER_ID
- loading the environment from the resulting directory with the
load_from_diskfunction (instead ofload_from_docker).
Make sure to pull this recent commit which fixed load_from_disk: https://github.com/deepmind/dm_hard_eight/commit/9e58b6f01d14d874bff16e8f9a2bb2b81c0f7b8d
It’s worth noting that without using Docker, it’s hard for us to give support and guarantees that the binaries are compatible with your target OS. If you run into compatibility issues (such as dynamic libraries failing to load), it’s possible that the chroot command or the LD_LIBRARY_PATH environment variable could help fix them.
We may add explicit support for loading without Docker at some point, but we can’t promise if or when this will happen.
I was able to run the environment without Docker, by using chroot as previously hinted:
-
I extracted the files from the Docker image into a new directory, by running the commands in my previous comment;
-
I mounted the dev, proc, and sys directories into that same directory as explained in this link. These three directories must be created and mounted next to the 'app' directory (at the same level as 'app', not inside it).
-
I applied this patch to the cloned
dm_hard_eightgit repository on my machine. Note: you'll need to adjust the path passed toload_from_diskto point at the correct directory on your machine. -
From the cloned
dm_hard_eightgit directory, I ran the following commands:
sudo pip3 install ./[examples]
sudo python3 examples/human_agent.py
One obvious caveat here is that the method above uses sudo privileges. This is a limitation of chroot, but I believe there are alternatives such as "Linux namespaces" that don't have this requirement. As mentioned before, there may be other incompatibilities with your system.
Hopefully this will help!
Thank you so much for your detailed replies. Unfortunately I do not have sudo privilages on our compute cluster. Is it possible to prepare the environment on my machine with a wheel or something? Or do I need sudo each time I run the environment?
With the method above you'd need root access.
Another working alternative uses the "bwrap" command, which some Linux distributions include out of the box. If running that on your cluster works, I can post details here of how to use it.
I was wondering if this could work with google colab? Since google colab doesn't connect to docker.