-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
86 lines (56 loc) · 2.22 KB
/
Dockerfile
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
# StageGym - RL with Stage ROS
# ROS Melodic, navigation, perception & additional packages
# Python3 OpenAIGym
# marrtino_apps
FROM ros:melodic-ros-base-bionic
ARG MACHTYPE=default
ARG DEBIAN_FRONTEND=noninteractive
###### User root ######
# install libraries and ros packages
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN apt-get update && \
apt-get install -y -qq --no-install-recommends \
tmux less sudo eom nano htop \
wget iputils-ping net-tools openssh-client nginx \
cmake make g++ git \
libglvnd0 libgl1 libglx0 libegl1 libxext6 libx11-6 \
mesa-common-dev mesa-utils freeglut3-dev \
python3 python3-pip python3-setuptools python3-wheel \
python python-pip python-setuptools python-wheel \
libwebsockets-dev \
ros-melodic-desktop ros-melodic-move-base && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Python packages
RUN pip3 install \
pandas scipy matplotlib sklearn jupyter notebook
RUN pip3 install \
gym pygame
RUN pip install future
#RUN pip3 install \
# tensorflow keras keras-rl
# User: robot (password: robot) with sudo power
RUN useradd -ms /bin/bash robot && echo "robot:robot" | chpasswd && adduser robot sudo
RUN adduser robot audio
RUN adduser robot video
RUN adduser robot dialout
###### User robot ######
USER robot
# Configuration
RUN rosdep update
RUN echo "set -g mouse on" > $HOME/.tmux.conf
# Init ROS workspace
#RUN mkdir -p $HOME/ros/catkin_ws/src
#RUN /bin/bash -c "source /opt/ros/melodic/setup.bash; cd $HOME/ros/catkin_ws/src; catkin_init_workspace; cd ..; catkin_make"
#RUN echo "source \$HOME/ros/catkin_ws/devel/setup.bash" >> $HOME/.bashrc
#RUN rosdep update
#RUN /bin/bash -ci "cd $HOME/ros/catkin_ws; catkin_make"
RUN echo "source /opt/ros/melodic/setup.bash" >> $HOME/.bashrc
RUN mkdir -p $HOME/src && \
cd $HOME/src && \
git clone https://bitbucket.org/iocchi/marrtino_apps.git
RUN echo "export MARRTINO_APPS_HOME=\$HOME/src/marrtino_apps" >> $HOME/.bashrc
RUN echo "export ROBOT_TYPE=stage" >> $HOME/.bashrc
# Set working dir and container command
WORKDIR /home/robot
CMD ["/usr/bin/tmux", "new", "-s", "stagerosgym"]