From 52d2844ab12b8f441f66e12fc5ceb9e0e84f9d2c Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Thu, 11 Feb 2021 11:44:27 +0100
Subject: [PATCH] Update dockerfile

---
 Dockerfile | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 6f362d2..d84d7c4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,33 +8,36 @@ ENV NVIDIA_DRIVER_CAPABILITIES \
 
 RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 ##Add IRI repository
-RUN apt-get update && apt-get install -y apt-utils
-RUN apt-get install -y vim wget ca-certificates xsdcxx 
+RUN apt-get -qq update && apt-get -qq install -y apt-utils
+RUN apt-get -qq install -y vim wget ca-certificates xsdcxx ssh-client
 RUN sudo sh -c 'echo "deb [arch=amd64] https://labrepo.iri.upc.edu/packages $(lsb_release -cs) main" > /etc/apt/sources.list.d/labrobotica_repo.list'
 RUN wget -q -O - https://labrepo.iri.upc.edu/labrobotica_repo.gpg.key | sudo apt-key add -
 
-RUN apt-get update && apt-get install -y iri-iriutils-dev
+RUN apt-get -qq update && apt-get -qq install -y iri-iriutils-dev
 
 RUN cd /root
 WORKDIR /root
 
 RUN mkdir -p catkin_ws/src
-
-##Meanwhile, copy workspace with repositories
-COPY catkin_ws catkin_ws
-##TODO Uncomment when repos are public
-#RUN cd /root/catkin_ws/src && wstool init ; wstool merge -y -r /root/catkin_ws/adc_https.rosinstall ; wstool update
-
-
-##TODO Uncomment when libraries are paquetized
-#RUN apt-get update && apt-get install -y iri-opendrive-to-gazebo-dev iri-autonomous-driving-tools-dev iri-opendrive-road-map-dev
-##Meanwhile, manually compile and install the ones copied in the workspace
-##TODO: remove libraries from rosinstall when paquetized
-RUN cd /root/catkin_ws/src/adc/libraries/autonomous_driving_tools && mkdir -p build && cd build && cmake .. && make && make install
-RUN cd /root/catkin_ws/src/adc/libraries/opendrive_road_map       && mkdir -p build && cd build && cmake .. && make && make install
-RUN cd /root/catkin_ws/src/adc/libraries/opendrive_to_gazebo      && mkdir -p build && cd build && cmake .. && make
-RUN cd /root/catkin_ws/src && rosdep install -y -i -r --from-paths .
-RUN /bin/bash -c "source /opt/ros/melodic/setup.bash && cd /root/catkin_ws && catkin_make -DCATKIN_BLACKLIST_PACKAGES='iri_model_car_driver_battery;iri_model_car_driver_ultrasounds;iri_model_car_driver_egomotion;iri_opendrive_global_planner'"
+RUN mkdir -p catkin_ws/rosinstall
+RUN cd /root/catkin_ws/rosinstall && wget -q https://gitlab.iri.upc.edu/labrobotica/ros/iri_ros_how_to/-/raw/melodic_migration/rosinstall/iri_core.rosinstall
+RUN cd /root/catkin_ws/rosinstall && wget -q https://gitlab.iri.upc.edu/mobile_robotics/adc/adc_2021/iri_adc_simulation_workshop/-/raw/master/rosinstall/iri_adc.rosinstall
+RUN cd /root/catkin_ws/rosinstall && wget -q https://gitlab.iri.upc.edu/mobile_robotics/adc/platforms/model_car/iri_model_car_how_to/-/raw/master/rosinstall/iri_model_car_common.rosinstall
+RUN cd /root/catkin_ws/rosinstall && wget -q https://gitlab.iri.upc.edu/mobile_robotics/adc/platforms/model_car/iri_model_car_how_to/-/raw/master/rosinstall/iri_model_car_simulator.rosinstall
+RUN cd /root/catkin_ws/src && wstool init
+RUN cd /root/catkin_ws/src && wstool merge -y -r /root/catkin_ws/rosinstall/iri_core.rosinstall
+RUN cd /root/catkin_ws/src && wstool merge -y -r /root/catkin_ws/rosinstall/iri_adc.rosinstall
+RUN cd /root/catkin_ws/src && wstool merge -y -r /root/catkin_ws/rosinstall/iri_model_car_common.rosinstall
+RUN cd /root/catkin_ws/src && wstool merge -y -r /root/catkin_ws/rosinstall/iri_model_car_simulator.rosinstall
+RUN cd /root/catkin_ws/src && wstool update
+
+RUN apt-get -qq update && apt-get -qq install -y iri-opendrive-to-gazebo-dev
+RUN apt-get -qq update && apt-get -qq install -y iri-autonomous-driving-tools-dev 
+RUN apt-get -qq update && apt-get -qq install -y iri-opendrive-road-map-dev
+
+RUN cd /root/catkin_ws/src && rosdep install -q -y -i -r --from-paths .
+
+RUN /bin/bash -c "source /opt/ros/melodic/setup.bash && cd /root/catkin_ws && catkin_make -DCATKIN_BLACKLIST_PACKAGES=''"
 RUN echo "source /root/catkin_ws/devel/setup.bash" >> /root/.bashrc
 RUN /bin/bash -c "cd /root && source .bashrc"
 
-- 
GitLab