Files
Gymnasium/bin/docker_entrypoint
pzhokhov 74229c8dc2 travis build and test failure fixes (#1031)
* build test image from scratch from ubuntu:16.04

* removed pulling old image from .travis.yml

* try installing keyboard-configuration on docker on travis

* trying install keyboard-configuration before rest of the packages

* upgrading dockerfile and entrypoint to work with ubuntu16.04

* fixing dummy display config wip

* install keyboard-properties first in dockerfile

* pass mujoco_key in .travis.yml

* skipsdist in tox.ini

* removed unpacking of the mujoco bundle in entrypoint

* using xvfb for fake display

* comment out self.viewer.close

* install ffmpeg

* squash run commands in dockerfile

* fixed typo in dockerfile

* fixed typo in dockerfile

* fixed typo in dockerfile

* use self.np_random in robotics/hand/manipulate

* some cleanups in .travis.yml

* cleaning up accidental changes

* cleaning up accidental changes

* inject mujoco key on runtime (instead of container buildtime)

* remove webhooks section from .travis.yml
2018-05-14 17:39:56 -07:00

30 lines
635 B
Bash
Executable File

#!/bin/sh
# This script is the entrypoint for our Docker image.
set -e
# Inject the mujoco license key (if planning to publish image, this step has to be runtime)
echo $MUJOCO_KEY | base64 --decode > /root/.mujoco/mjkey.txt
# Set up display; otherwise rendering will fail
Xvfb -screen 0 1024x768x24 &
export DISPLAY=:0
# Wait for the file to come up
display=0
file="/tmp/.X11-unix/X$display"
for i in $(seq 1 10); do
if [ -e "$file" ]; then
break
fi
echo "Waiting for $file to be created (try $i/10)"
sleep "$i"
done
if ! [ -e "$file" ]; then
echo "Timing out: $file was not created"
exit 1
fi
exec "$@"