Upload Dockerfile
Browse files
learning_machines_robobo/examples/full_project_setup/Dockerfile
CHANGED
@@ -1,45 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM ros:noetic
|
2 |
|
3 |
-
# Makking sure our ROS node has ports to connect trough.
|
4 |
-
# These are the ports specified in `rospy.init_node()` in hardware.py
|
5 |
EXPOSE 45100
|
6 |
EXPOSE 45101
|
7 |
|
8 |
-
RUN apt-get update -y && apt-get install -y python3 python3-pip git && rm -rf /var/lib/apt/lists/*
|
9 |
-
|
10 |
-
# Install dependencies.
|
11 |
|
12 |
-
# These are package requirements for the dependencies.
|
13 |
-
# You should add to these if you add python packages that require c libraries to be installed
|
14 |
-
RUN apt-get update -y && apt-get install ffmpeg libsm6 libxext6 ros-noetic-opencv-apps dos2unix -y && rm -rf /var/lib/apt/lists/*
|
15 |
-
|
16 |
-
# The python3 interpreter is already being shilled by ros:noetic, so no need for a venv.
|
17 |
COPY ./requirements.txt /requirements.txt
|
18 |
RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
|
19 |
-
RUN python3 -m pip install matplotlib gym stable_baselines3 shimmy
|
20 |
|
21 |
-
# This cd's into a new `catkin_ws` directory anyone starting the shell will end up in.
|
22 |
WORKDIR /root/catkin_ws
|
23 |
-
|
24 |
-
# This copies the local catkin_ws into the docker container.
|
25 |
COPY ./catkin_ws .
|
26 |
|
27 |
-
# Set up the envoirement to actually run the code
|
28 |
COPY ./scripts/entrypoint.bash ./entrypoint.bash
|
29 |
COPY ./scripts/setup.bash ./setup.bash
|
30 |
|
31 |
-
# Convert the line endings for the Windows users,
|
32 |
-
# calling `dos2unix` on all files ending in `.py` or `.bash`
|
33 |
RUN find . -type f \( -name '*.py' -o -name '*.bash' \) -exec 'dos2unix' -l -- '{}' \; && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*
|
34 |
|
35 |
-
# Compile the catkin_ws.
|
36 |
RUN bash -c 'source /opt/ros/noetic/setup.bash && catkin_make'
|
37 |
|
38 |
RUN chmod -R u+x /root/catkin_ws/
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
# RUN echo 'source /root/catkin_ws/devel/setup.bash' >> /root/.bashrc
|
43 |
-
# RUN echo 'source /root/catkin_ws/setup.bash' >> /root/.bashrc
|
44 |
|
45 |
-
ENTRYPOINT ["./entrypoint.bash"]
|
|
|
1 |
+
# FROM ros:noetic
|
2 |
+
|
3 |
+
# # Making sure our ROS node has ports to connect through.
|
4 |
+
# # These are the ports specified in `rospy.init_node()` in hardware.py
|
5 |
+
# EXPOSE 45100
|
6 |
+
# EXPOSE 45101
|
7 |
+
|
8 |
+
# RUN apt-get update -y && apt-get install -y python3 python3-pip git && rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
+
# # Install dependencies.
|
11 |
+
# # These are package requirements for the dependencies.
|
12 |
+
# # You should add to these if you add python packages that require c libraries to be installed
|
13 |
+
# RUN apt-get update -y && apt-get install ffmpeg libsm6 libxext6 ros-noetic-opencv-apps dos2unix x11-apps -y && rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
# # Install X11 and Mesa for OpenGL support
|
16 |
+
# RUN apt-get update && apt-get install -y \
|
17 |
+
# libgl1-mesa-glx \
|
18 |
+
# libgl1-mesa-dri \
|
19 |
+
# x11-xserver-utils \
|
20 |
+
# && rm -rf /var/lib/apt/lists/*
|
21 |
+
|
22 |
+
# # The python3 interpreter is already being shilled by ros:noetic, so no need for a venv.
|
23 |
+
# COPY ./requirements.txt /requirements.txt
|
24 |
+
# RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
|
25 |
+
# RUN python3 -m pip install matplotlib gym stable_baselines3 shimmy tensorboard
|
26 |
+
|
27 |
+
# # This cd's into a new `catkin_ws` directory anyone starting the shell will end up in.
|
28 |
+
# WORKDIR /root/catkin_ws
|
29 |
+
|
30 |
+
# # This copies the local catkin_ws into the docker container.
|
31 |
+
# COPY ./catkin_ws .
|
32 |
+
|
33 |
+
# # Set up the environment to actually run the code
|
34 |
+
# COPY ./scripts/entrypoint.bash ./entrypoint.bash
|
35 |
+
# COPY ./scripts/setup.bash ./setup.bash
|
36 |
+
|
37 |
+
# # Convert the line endings for the Windows users,
|
38 |
+
# # calling `dos2unix` on all files ending in `.py` or `.bash`
|
39 |
+
# RUN find . -type f \( -name '*.py' -o -name '*.bash' \) -exec 'dos2unix' -l -- '{}' \; && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*
|
40 |
+
|
41 |
+
# # Compile the catkin_ws.
|
42 |
+
# RUN bash -c 'source /opt/ros/noetic/setup.bash && catkin_make'
|
43 |
+
|
44 |
+
# RUN chmod -R u+x /root/catkin_ws/
|
45 |
+
|
46 |
+
# # Uncomment these lines and comment out the last line for debugging
|
47 |
+
# # RUN echo 'source /opt/ros/noetic/setup.bash' >> /root/.bashrc
|
48 |
+
# # RUN echo 'source /root/catkin_ws/devel/setup.bash' >> /root/.bashrc
|
49 |
+
# # RUN echo 'source /root/catkin_ws/setup.bash' >> /root/.bashrc
|
50 |
+
|
51 |
+
# # Set the DISPLAY environment variable
|
52 |
+
# ENV QT_X11_NO_MITSHM=1
|
53 |
+
# ENV DISPLAY=${DISPLAY:-:0}
|
54 |
+
|
55 |
+
# ENTRYPOINT ["./entrypoint.bash"]
|
56 |
+
|
57 |
FROM ros:noetic
|
58 |
|
|
|
|
|
59 |
EXPOSE 45100
|
60 |
EXPOSE 45101
|
61 |
|
62 |
+
RUN apt-get update -y && apt-get install -y python3 python3-pip git ffmpeg libsm6 libxext6 ros-noetic-opencv-apps dos2unix x11-apps && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
COPY ./requirements.txt /requirements.txt
|
65 |
RUN python3 -m pip install -r /requirements.txt && rm /requirements.txt
|
66 |
+
RUN python3 -m pip install matplotlib gym stable_baselines3 shimmy tensorboard
|
67 |
|
|
|
68 |
WORKDIR /root/catkin_ws
|
|
|
|
|
69 |
COPY ./catkin_ws .
|
70 |
|
|
|
71 |
COPY ./scripts/entrypoint.bash ./entrypoint.bash
|
72 |
COPY ./scripts/setup.bash ./setup.bash
|
73 |
|
|
|
|
|
74 |
RUN find . -type f \( -name '*.py' -o -name '*.bash' \) -exec 'dos2unix' -l -- '{}' \; && apt-get --purge remove -y dos2unix && rm -rf /var/lib/apt/lists/*
|
75 |
|
|
|
76 |
RUN bash -c 'source /opt/ros/noetic/setup.bash && catkin_make'
|
77 |
|
78 |
RUN chmod -R u+x /root/catkin_ws/
|
79 |
|
80 |
+
ENV QT_X11_NO_MITSHM=1
|
81 |
+
ENV DISPLAY=${DISPLAY:-:0}
|
|
|
|
|
82 |
|
83 |
+
ENTRYPOINT ["./entrypoint.bash"]
|