diff --git a/Eigen/installEigen.sh b/Eigen/installEigen.sh new file mode 100755 index 0000000000000000000000000000000000000000..f458d5fcd3d42f6a6d200d71645953755097ea36 --- /dev/null +++ b/Eigen/installEigen.sh @@ -0,0 +1,20 @@ +#!/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 diff --git a/dockerfiles/DevenvKinetic.Dockerfile b/dockerfiles/DevenvKinetic.Dockerfile index f9ca4390525bc6ab073722954e05383b58b7a6ed..bb509a7cff35ccaddd5832a307975ae036382e1e 100644 --- a/dockerfiles/DevenvKinetic.Dockerfile +++ b/dockerfiles/DevenvKinetic.Dockerfile @@ -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 \ diff --git a/dockerfiles/ScanNnplan.Dockerfile b/dockerfiles/ScanNnplan.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..72991f0c511bdc32a70810e3e4e23354b2bc1611 --- /dev/null +++ b/dockerfiles/ScanNnplan.Dockerfile @@ -0,0 +1,144 @@ +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 diff --git a/dockerfiles/urko.Dockerfile b/dockerfiles/urko.Dockerfile index bba964489c170fa84f3ac1fb551d4f7614a37dc6..b20b9be265056248c8d2137e3bed56916438fddf 100644 --- a/dockerfiles/urko.Dockerfile +++ b/dockerfiles/urko.Dockerfile @@ -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 diff --git a/notes/Docker_cheatsheet.md b/notes/Docker_cheatsheet.md new file mode 100644 index 0000000000000000000000000000000000000000..b1dcd4fee913c72a2ff2cf753927bc00a0d938b2 --- /dev/null +++ b/notes/Docker_cheatsheet.md @@ -0,0 +1,13 @@ +# 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