This repository has been archived by the owner on Mar 17, 2019. It is now read-only.
forked from openai/gym
-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3829e9b
commit 560bd4a
Showing
5 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FROM austinderic/gym-gazebo:melodic | ||
LABEL maintainer "[email protected]" | ||
|
||
#-------------------- | ||
# Install Gym-Gazebo Turtlebot dependencies | ||
#------------------ | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ros-melodic-geometry2 \ | ||
ros-melodic-xacro \ | ||
ros-melodic-roslint \ | ||
ros-melodic-ros-control \ | ||
ros-melodic-image-common \ | ||
ros-melodic-control-toolbox \ | ||
ros-melodic-gazebo-ros-pkgs \ | ||
ros-melodic-roslint \ | ||
ros-melodic-joystick-drivers \ | ||
ros-melodic-ecl \ | ||
ros-melodic-pcl-ros \ | ||
ros-melodic-yocs-msgs \ | ||
libbullet-dev \ | ||
libusb-dev \ | ||
libsdl-dev \ | ||
libsdl-image1.2-dev \ | ||
libftdi-dev \ | ||
mesa-utils \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip install scikit-image | ||
|
||
#-------------------- | ||
# Install Gym-Gazebo Turtlebot Example | ||
#------------------ | ||
|
||
RUN mkdir -p /root/catkin_ws/src | ||
WORKDIR /root/catkin_ws/src | ||
RUN wstool init | ||
RUN wstool merge https://gist.githubusercontent.com/AustinDeric/c14633f1d5bcabc14307dcca2425d133/raw/266668674782d5e1096ecd13f3ea6dcf5af5248a/gym-gazebo-turtlebot-melodic.rosinstall | ||
RUN wstool update | ||
WORKDIR /root/catkin_ws | ||
RUN /bin/bash -c "source /opt/ros/melodic/setup.bash && catkin build" | ||
RUN echo "source /root/catkin_ws/devel/setup.bash" >> ~/.bashrc | ||
|
||
#-------------------- | ||
# Setup environment variables | ||
#------------------ | ||
RUN echo "export GYM_GAZEBO_WORLD_CIRCUIT2=/root/gym-gazebo/gym_gazebo/envs/assets/worlds/circuit2.world" >> ~/.bashrc | ||
RUN export GYM_GAZEBO_WORLD_CIRCUIT2=/root/gym-gazebo/gym_gazebo/envs/assets/worlds/circuit2.world | ||
RUN echo "export GAZEBO_MODEL_PATH=/root/gym-gazebo/gym_gazebo/envs/assets/models" >> ~/.bashrc | ||
|
||
WORKDIR /root/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
XAUTH=/tmp/.docker.xauth | ||
if [ ! -f $XAUTH ] | ||
then | ||
xauth_list=$(xauth nlist :0 | sed -e 's/^..../ffff/') | ||
if [ ! -z "$xauth_list" ] | ||
then | ||
echo $xauth_list | xauth -f $XAUTH nmerge - | ||
else | ||
touch $XAUTH | ||
fi | ||
chmod a+r $XAUTH | ||
fi | ||
|
||
docker run -it --rm \ | ||
--runtime=nvidia \ | ||
--env DISPLAY \ | ||
--env QT_X11_NO_MITSHM=1 \ | ||
--env XAUTHORITY=$XAUTH \ | ||
--volume "$XAUTH:$XAUTH" \ | ||
--volume "/tmp/.X11-unix:/tmp/.X11-unix" \ | ||
--name=gym-gazebo-turtlebot \ | ||
--rm \ | ||
austinderic/gym-gazebo-turtlebot:melodic \ | ||
/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM osrf/ros:melodic-desktop-full | ||
|
||
# set environment variables | ||
ENV NVIDIA_VISIBLE_DEVICES ${NVIDIA_VISIBLE_DEVICES:-all} | ||
ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics | ||
|
||
# Dependencies for building packages | ||
RUN apt-get update && apt-get install -y \ | ||
python-rosinstall \ | ||
python-rosinstall-generator \ | ||
python-wstool \ | ||
build-essential \ | ||
python-pip\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Unofficial ROS installation steps | ||
RUN pip install --upgrade pip | ||
|
||
RUN pip install -U catkin_tools | ||
|
||
|
||
#-------------------- | ||
# Install OpenAI gym | ||
#------------------- | ||
|
||
RUN pip install gym | ||
|
||
#-------------------- | ||
# Install gym-gazebo | ||
#-------------------- | ||
|
||
RUN git clone https://github.com/erlerobot/gym-gazebo.git /root/gym-gazebo | ||
WORKDIR /root/gym-gazebo | ||
RUN pip install -e . | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
XAUTH=/tmp/.docker.xauth | ||
if [ ! -f $XAUTH ] | ||
then | ||
xauth_list=$(xauth nlist :0 | sed -e 's/^..../ffff/') | ||
if [ ! -z "$xauth_list" ] | ||
then | ||
echo $xauth_list | xauth -f $XAUTH nmerge - | ||
else | ||
touch $XAUTH | ||
fi | ||
chmod a+r $XAUTH | ||
fi | ||
|
||
docker run -it --rm \ | ||
--runtime=nvidia \ | ||
--env DISPLAY \ | ||
--env QT_X11_NO_MITSHM=1 \ | ||
--env XAUTHORITY=$XAUTH \ | ||
--volume "$XAUTH:$XAUTH" \ | ||
--volume "/tmp/.X11-unix:/tmp/.X11-unix" \ | ||
austinderic/gym-gazebo:melodic \ | ||
/bin/bash |