Skip to content
Snippets Groups Projects
Commit 4d685a38 authored by Montaño Sarria, Andres Felipe's avatar Montaño Sarria, Andres Felipe
Browse files

Add ScanNPlan.Dockerfile now download the package and internally built it

parent 02a2fba7
No related branches found
No related tags found
No related merge requests found
...@@ -110,27 +110,13 @@ RUN apt-get install -y \ ...@@ -110,27 +110,13 @@ RUN apt-get install -y \
libglfw3-dev \ libglfw3-dev \
sqlite3 sqlite3
RUN apt-get install -y \
ros-melodic-realsense2-camera
# Update final image # Update final image
RUN apt-get update && apt-get -y upgrade RUN apt-get update && apt-get -y upgrade
RUN apt-get clean RUN apt-get clean
# Install code
# SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
# && mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg \
# && sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
# RUN apt-get update && apt-get install -y --no-install-recommends \
# code \
# && rm -rf /var/lib/apt/lists/*
# RUN code --user-data-dir /root \
# --install-extension ms-iot.vscode-ros \
# --install-extension joaompinto.asciidoctor-vscode \
# --install-extension ms-python.python \
# --install-extension ms-vscode.cpptools \
# --install-extension ms-azuretools.vscode-docker \
# --install-extension twxs.cmake
# Set entrypoint # Set entrypoint
COPY ./ros_entrypoint.sh / COPY ./ros_entrypoint.sh /
RUN chmod a+x /ros_entrypoint.sh RUN chmod a+x /ros_entrypoint.sh
......
...@@ -65,20 +65,27 @@ RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/git ...@@ -65,20 +65,27 @@ RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/git
# Packages installed as dependecies of kawada_lab_aplication # Packages installed as dependecies of kawada_lab_aplication
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
cmake \ cmake \
python3-lxml \
cython \
ros-noetic-effort-controllers \
ros-noetic-joint-trajectory-controller \
ros-noetic-moveit-ros-move-group \
ros-noetic-moveit-planners-ompl \
ros-noetic-moveit-ros-visualization \
ros-noetic-moveit-fake-controller-manager \
ros-noetic-moveit-simple-controller-manager \
ros-noetic-moveit-core \
ros-noetic-moveit-kinematics \
ros-noetic-moveit-ros-planning \
ros-noetic-rqt-joint-trajectory-controller \
python3-vcstool \
python3-pip \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Update final image # Update final image
RUN apt-get update && apt-get -y upgrade RUN apt-get update && apt-get -y upgrade
# Install code RUN python3 -m pip install -U rope
# SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
# && mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg \
# && sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
# RUN apt-get update && apt-get install -y --no-install-recommends \
# code \
# && rm -rf /var/lib/apt/lists/*
# Set entrypoint # Set entrypoint
COPY ./ros_entrypoint.sh / COPY ./ros_entrypoint.sh /
......
FROM osrf/ros:melodic-desktop-full
ENV ROS_DISTRO melodic
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Setup environment
RUN apt-get update && apt-get install -y \
locales \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Configure apt and install packages
RUN apt-get -y install --no-install-recommends \
apt-transport-https \
ca-certificates \
software-properties-common \
curl \
gnupg-agent \
apt-utils dialog 2>&1 \
git \
git-lfs \
nano \
less \
iproute2 \
procps \
lsb-release \
curl \
cmake \
openssh-client \
python-catkin-tools \
python-osrf-pycommon \
ros-${ROS_DISTRO}-rosmon \
xterm \
&& rm -rf /var/lib/apt/lists/*
# Install docker-ce
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update && apt-get -y install --no-install-recommends \
docker-ce-cli \
&& rm -rf /var/lib/apt/lists/*
# Configure system to look for debian packages in the Artifactory repository
ARG USER_API_KEY_ARTIFACTS_TECNALIA
RUN sh -c "echo \
'deb https://${USER_API_KEY_ARTIFACTS_TECNALIA}@artifact.tecnalia.com/artifactory/tecnalia-robotics-debian xenial main' \
>> /etc/apt/sources.list.d/tecnalia.list"
# Import the key in order to be able to use the packages from the repository
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7E72C5B4111A50084C63C9489E7A9B1D990CF897
# Configure rosdep
RUN sh -c "echo 'yaml https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/rosdistro/rosdep_tecnalia.yaml' \
>> /etc/ros/rosdep/sources.list.d/20-default.list"
# Packages installed as dependecies of kawada_lab_aplication
RUN apt-get update && apt-get install -y \
ros-melodic-ros-control-boilerplate \
ros-melodic-ur-msgs \
ros-melodic-eigen-stl-containers \
ros-melodic-industrial-robot-simulator \
ros-melodic-srdfdom \
ros-melodic-joint-state-publisher-gui \
python-pyside \
python-lxml \
python-qt4 \
python-qt4-dev \
libshiboken-dev \
shiboken \
libpyside-dev \
libcomedi-dev \
libmodbus-dev \
libcanberra-gtk-module \
libcanberra-gtk0 \
cmake
# Packages installed as dependecies of sherlock-ui
RUN apt-get install -y \
ros-melodic-rosbridge-server \
ros-melodic-moveit \
ros-melodic-hector-mapping \
ros-melodic-hector-gazebo-plugins \
ros-melodic-amcl \
ros-melodic-gmapping \
ros-melodic-twist-mux \
ros-melodic-map-server \
ros-melodic-joy \
ros-melodic-teb-local-planner \
ros-melodic-move-base \
ros-melodic-velocity-controllers \
ros-melodic-ackermann-msgs \
ros-melodic-robot-localization \
ros-melodic-imu-complementary-filter \
ros-melodic-mavros-msgs \
ros-melodic-joint-trajectory-controller \
python-sqlalchemy
# Packages installed as dependecies of botarobota
RUN apt-get install -y \
ros-melodic-ar-track-alvar-msgs \
ros-melodic-navigation
RUN apt-get install -y \
ros-melodic-ar-track-alvar \
libceres-dev \
libglfw3-dev \
sqlite3
# Update final image
RUN apt-get update && apt-get -y upgrade
RUN apt-get clean
# Set entrypoint
COPY ./ros_entrypoint.sh /
RUN chmod a+x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=
\ No newline at end of file
#!/bin/bash
# Setup ros environment
source "/opt/ros/$ROS_DISTRO/setup.bash"
source "/root/dev_ws/devel/setup.bash"
#roslaunch godel_cr7ial_workspace_support cr7ial_blending.launch sim_laser:=false sim_sensor:=false use_sim:=false
exec "$@"
\ No newline at end of file
### FIRST LAYER TO DOWNLOAD GIT REPOS
FROM osrf/ros:melodic-desktop-full as intermediate
RUN apt-get update
#################################
# Add ssh private key
RUN apt-get install -y ssh
ARG SSH_PRIVATE_KEY
RUN mkdir ~/.ssh/
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa
RUN chmod 600 ~/.ssh/id_rsa
RUN ssh-keyscan git.code.tecnalia.com >> /root/.ssh/known_hosts && chmod 644 /root/.ssh/known_hosts
#Print SSH_PRIVATE_KEY (for test)
RUN echo "${SSH_PRIVATE_KEY}"
RUN apt-get install -y git
# Create workspace
RUN mkdir -p /root/dev_ws/src
WORKDIR /root/dev_ws/src
# Install python-wstools
RUN apt-get install -y wget
RUN wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
RUN apt-get update
RUN apt-get install -y python-catkin-tools
# Clone main package
WORKDIR /root/dev_ws/src
RUN git clone git@git.code.tecnalia.com:tecnalia_robotics/rosin/godel_fanuc_config.git
RUN cd godel_fanuc_config && git checkout Jon-O-laser-integration
# Populate dependencies with rosinstall
RUN mkdir /root/dev_ws/src/dependencies
WORKDIR /root/dev_ws/src/dependencies
RUN wstool init && wstool merge ../godel_fanuc_config/.rosinstall && wstool update
# Preparing docker
FROM nvidia/cuda:11.3.0-base-ubuntu16.04 FROM nvidia/cuda:11.3.0-base-ubuntu16.04
WORKDIR /root/ws WORKDIR /root/ws
...@@ -137,8 +176,16 @@ RUN dpkg -i zivid-tools_1.8.1+6967bc1b-1_amd64.deb ...@@ -137,8 +176,16 @@ RUN dpkg -i zivid-tools_1.8.1+6967bc1b-1_amd64.deb
COPY ./ros_entrypoint.sh / COPY ./ros_entrypoint.sh /
RUN chmod a+x /ros_entrypoint.sh RUN chmod a+x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"] # Copy workspace with dependencies created in the previous layer
CMD ["bash"] COPY --from=intermediate /root/dev_ws /root/dev_ws
WORKDIR /root/dev_ws
RUN catkin init && catkin config --extend /opt/ros/kinetic && catkin build
# Add source ros to .bashrc
RUN echo "#ROS\nsource /opt/ros/kinetic/setup.bash\nsource /root/dev_ws/devel/setup.bash" >> /root/.bashrc
ENTRYPOINT ["/ros_entrypoint_SCP.sh"]
#CMD ["roslaunch godel_cr7ial_workspace_support cr7ial_blending.launch sim_laser:=false sim_sensor:=false use_sim:=false"]
# Switch back to dialog for any ad-hoc use of apt-get # Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND= ENV DEBIAN_FRONTEND=
\ No newline at end of file
# Poining to pip venv # Poining to pip venv
alias rocker="~/.venv/rocker/bin/rocker" #alias rocker="~/.venv/rocker/bin/rocker"
alias ddeploy="~/.venv/ddeploy/bin/ddeploy" alias ddeploy="~/.venv/ddeploy/bin/ddeploy"
# docker common commands # docker common commands
...@@ -33,7 +33,7 @@ function runmelodic() { ...@@ -33,7 +33,7 @@ function runmelodic() {
} }
function runnoetic() { function runnoetic() {
rocker --home --user --x11 --ssh --git --name noetic devenv:noetic $1 rocker --home --user --x11 --nvidia --ssh --git --name noetic devenv:noetic $1
} }
function runkinetic() { function runkinetic() {
......
python3 -m venv ddeploy
git clone git@git.code.tecnalia.com:tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy.git
git checkout current-folder-fix
source bin/activate
pip install -e src/ddeploy
deactivate
./bin/ddeploy --name cosa --distro melodic -s git+ssh://github.com/ros/std_msgs.git#kinetic-devel
git clone https://github.com/ros/std_msgs.git
~/.venv/ddeploy/bin/ddeploy --name mensajes --distro melodic -s std_msgs
python3 -m venv ddeploy
rocker --home --user --x11 --nvidia --ssh --git osrf/ros:melodic-desktop-full bash
rocker --home --user --x11 --nvidia --ssh --git ubuntu:bionic bash
{
"folders": [
{
"path": ".."
}
],
"settings": {}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment