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 281
/
Dockerfile.old
159 lines (124 loc) · 3.62 KB
/
Dockerfile.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# A Dockerfile for the gym-gazebo environment
# based in ubuntu 14.04 and Python 2.7
# Currently fails at:
#
# E: Version '1.1.4-0*' for 'ros-indigo-ros-core' was not found
# The command '/bin/sh -c apt-get update && apt-get install -y ros-indigo-ros-core=1.1.4-0*
# && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
FROM ubuntu:14.04
#--------------------
# General setup
#--------------------
# Get the dependencies
RUN apt-get update \
&& apt-get install -y xorg-dev \
libgl1-mesa-dev \
xvfb \
libxinerama1 \
libxcursor1 \
unzip \
libglu1-mesa \
libav-tools \
python-numpy \
python-scipy \
python-pyglet \
python-setuptools \
libpq-dev \
libjpeg-dev \
wget \
curl \
cmake \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& easy_install pip
WORKDIR /usr/local/gym
# Copy the code
RUN mkdir gym-gazebo
COPY . /usr/local/gym/gym-gazebo
#--------------------
# Install gym
#--------------------
# Clone the official gym
RUN git clone https://github.com/openai/gym
# Install the gym's requirements
RUN pip install -r gym/requirements.txt
# Install the gym
RUN ls -l
RUN pip install -e gym/
# Checks
#RUN python --version
#RUN python -c "import gym"
# Debug
#RUN ls -l /usr/local/gym
#RUN ls -l /usr/local/gym/gym-gazebo
#RUN ls -l /usr/local/gym/gym
#--------------------
# Install ROS
#--------------------
# setup environment
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
# setup keys
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO indigo
RUN apt-get update && apt-get install -y \
ros-indigo-ros-core=1.1.4-0* \
&& rm -rf /var/lib/apt/lists/*
# ros-indigo-desktop-full
#--------------------
# Install Gazebo
#--------------------
RUN sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
RUN sudo apt-get update
RUN sudo apt-get install gazebo7 libgazebo7-dev -y
# setup environment
EXPOSE 11345
# Install additional dependencies
RUN apt-get install -y ros-indigo-cv-bridge
RUN apt-get install -y ros-indigo-robot-state-publisher
#--------------------
# Install deep learning toolkits
#--------------------
# install dependencies
RUN sudo pip install h5py
RUN sudo apt-get install gfortran -y
# install sript specific dependencies (temporal)
RUN sudo apt-get install python-skimage -y
# install Theano
#RUN git clone git://github.com/Theano/Theano.git
#RUN cd Theano/ && sudo python setup.py develop
RUN sudo pip install Theano
# install Keras
RUN sudo pip install keras
#--------------------
# Install gym-gazebo
#--------------------
RUN cd gym-gazebo && sudo pip install -e .
# install dependencies
RUN cd /usr/local/gym/gym-gazebo/gym_gazebo/envs/installation && bash setup.bash
#WORKDIR /root
#ENTRYPOINT ["/usr/local/gym/bin/docker_entrypoint"]
# setup entrypoint
#RUN ls /usr/local/gym/gym-gazebo/
#RUN ls ./gym-gazebo
#COPY /usr/local/gym/gym-gazebo/entrypoint.sh /
#--------------------
# Entry point
#--------------------
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bash"]