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

ScanNplan demo working from docker -- OK

parent 2c1c7696
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
# Script to download and install Eigen3
set -ex
version="3.4.0" # Release tag on GitLab
prefix="$HOME/.local"
cd /tmp
# Download
git clone --single-branch --depth=1 --branch "$version" \
https://gitlab.com/libeigen/eigen.git
mkdir eigen/build && cd $_
# Configure
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$prefix"
# Install
make install
\ No newline at end of file
......@@ -77,6 +77,9 @@ RUN apt-get update && apt-get install -y \
ros-kinetic-urdfdom-py \
ros-kinetic-moveit-ros-manipulation \
ros-kinetic-moveit-simple-controller-manager \
ros-kinetic-moveit-fake-controller-manager \
ros-kinetic-moveit-setup-assistant \
ros-kinetic-trac-ik-kinematics-plugin \
ros-kinetic-swri-profiler \
ros-kinetic-fanuc-cr7ia-support \
ros-kinetic-fanuc-driver \
......
FROM nvidia/cuda:11.3.0-base-ubuntu16.04
WORKDIR /root/ws
ENV ROS_DISTRO kinetic
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# install basic packages
RUN apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
lsb-release \
sudo \
ocl-icd-libopencl1 \
clinfo \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /etc/OpenCL/vendors && \
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
# 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
# Setup sources.list
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-get -y install --no-install-recommends \
curl
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
RUN apt-get update && apt-get install -y \
ros-kinetic-desktop-full
# Configure apt and install packages
RUN apt-get -y install --no-install-recommends \
apt-transport-https \
ca-certificates \
software-properties-common \
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 \
python-rosdep \
python-rosinstall \
python-rosinstall-generator \
python-wstool \
build-essential \
ros-${ROS_DISTRO}-rosmon \
xterm \
wget \
clinfo \
&& 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 rosdep init
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"
RUN rosdep update
# Packages installed as dependecies of kawada_lab_aplication
RUN apt-get update && apt-get install -y \
cmake \
ros-kinetic-moveit-planners-ompl \
ros-kinetic-moveit-ros-planning \
ros-kinetic-ompl \
ros-kinetic-moveit-kinematics \
ros-kinetic-moveit-ros-planning-interface \
ros-kinetic-moveit-ros-visualization \
ros-kinetic-catkin-virtualenv \
ros-kinetic-zivid-camera \
ros-kinetic-abb-driver \
ros-kinetic-industrial-robot-simulator \
ros-kinetic-moveit-ros-move-group \
ros-kinetic-moveit-core \
ros-kinetic-srdfdom \
ros-kinetic-urdfdom-py \
ros-kinetic-moveit-ros-manipulation \
ros-kinetic-moveit-simple-controller-manager \
ros-kinetic-moveit-fake-controller-manager \
ros-kinetic-moveit-setup-assistant \
ros-kinetic-trac-ik-kinematics-plugin \
ros-kinetic-swri-profiler \
ros-kinetic-fanuc-cr7ia-support \
ros-kinetic-fanuc-driver \
ros-kinetic-fanuc-resources \
libqd-dev \
python-zmq \
python3-catkin-pkg-modules \
&& rm -rf /var/lib/apt/lists/*
# Update final image
RUN apt-get update && apt-get -y upgrade
RUN wget https://www.zivid.com/hubfs/softwarefiles/releases/1.8.1+6967bc1b-1/u16/zivid-studio_1.8.1+6967bc1b-1_amd64.deb
RUN wget https://www.zivid.com/hubfs/softwarefiles/releases/1.8.1+6967bc1b-1/u16/zivid-tools_1.8.1+6967bc1b-1_amd64.deb
RUN dpkg -i zivid-studio_1.8.1+6967bc1b-1_amd64.deb
RUN dpkg -i zivid-tools_1.8.1+6967bc1b-1_amd64.deb
# 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
......@@ -7,7 +7,7 @@ RUN apt-get update
# Add ssh private key
RUN apt-get install -y ssh
arg SSH_PRIVATE_KEY
ARG SSH_PRIVATE_KEY
RUN mkdir ~/.ssh/
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa
RUN chmod 600 ~/.ssh/id_rsa
......
# Docker cheatsheet
Para guardar una imagen que se hace en una máquina y se quiere transferir a otro sistema
```
docker save -o <path for generated tar file> <image name>
```
Para cargar una imagen desde un archivo tar
```
docker load -i <path to image tar file>
```
\ 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