ruoshi
(Ruoshi)
February 10, 2022, 7:15pm
1
Hello,
When I run
sudo docker build -t xxxx .
This error appeared:
/bin/sh: 1: curl: not found
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
The command in my Dockerfile is:
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
I already installed curl on my ubuntu 18.04.
Could someone help me with this? Much appreciated!
terpz
(Martin Terp)
February 10, 2022, 7:38pm
2
Hi
Can you share your Dockerfile?
You need curl in the image (in your dockerfile)
Not on your host
ruoshi
(Ruoshi)
February 10, 2022, 8:05pm
3
Thank you for the reply. THE DOCKER FILE:
FROM osrf/ros:melodic-desktop-full
MAINTAINER Quentin Rouxel leph.quentinrouxel@gmail.com
#Fix ROS GPG key
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
#Upgrade the system
RUN apt clean && apt-get update && apt-get --with-new-pkgs upgrade -y
#Install standart, ros and gazebo packages
RUN apt-get update && apt-get install -y --allow-unauthenticated --fix-missing \
#Install essential tools and libraries
apt-utils build-essential tree wget git vim ctags \
net-tools openssh-client rsyslog software-properties-common \
gdb htop valgrind emacs strace ltrace unzip gnuplot gnuplot-qt \
libjsoncpp-dev libncurses5-dev netcat usbutils libtclap-dev \
python-catkin-tools \
#Install Franka library
ros-melodic-libfranka ros-melodic-franka-description \
#Install OpenGL related libraries
libglew-dev glew-utils mesa-utils mesa-utils-extra \
#Install SFML
libsfml-dev \
#Install v4l2
libv4l-0 libv4l-dev \
#Install turbo jpeg
libturbojpeg libturbojpeg0-dev \
#Install LAPACK
libopenblas-dev liblapack-dev liblapacke-dev \
#Install pip2 and python2 packages
python-pip python-tk \
#Install pip3 and python3 packages
python3-pip python3-tk ros-melodic-eigenpy ros-melodic- \
#Clean up
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#Install Python2 packages
RUN pip2 install --upgrade pip && pip2 install quadprog scipy
#Install Python3 and PyBullet environment
RUN pip3 install --upgrade pip && pip3 install numpy pybullet matplotlib scipy scikit-build
#Install PyTorch
RUN pip3 install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
#Install DRL environment
RUN pip3 install gym
#Configure Vim
RUN rm -rf /root/.vim \
&& git clone https://github.com/Leph/myVimConfig /root/.vim/ \
&& ln -sf /root/.vim/vimrc.vim /root/.vimrc
#Update bashrc
COPY tmp_bashrc /root/.bashrc
#Create and initialize workspace directory
RUN mkdir -p /WorkspaceUoE/src \
&& cd /WorkspaceUoE/src/ \
&& /bin/bash -c \
"source /opt/ros/melodic/setup.bash && catkin_init_workspace" \
&& git clone https://github.com/ipab-slmc/libzmq_catkin.git \
&& git clone https://github.com/ipab-slmc/RhIO.git \
&& git clone https://github.com/ipab-slmc/rbdl_catkin.git \
&& git clone https://github.com/ipab-slmc/mkfilter_catkin.git \
&& git clone https://github.com/stack-of-tasks/pinocchio.git \
&& cd pinocchio && git submodule update --init \
&& cd /WorkspaceUoE/ \
&& /bin/bash -c \
"source /opt/ros/melodic/setup.bash \
&& catkin config --install --extend /opt/ros/melodic/ --cmake-args \
-DCMAKE_BUILD_TYPE=Release -DBUILD_UOE_APPS=OFF -DCATKIN_ENABLE_TESTING=OFF \
-DBUILD_PYTHON_INTERFACE=OFF \
-DCMAKE_CXX_FLAGS='-Wall -W' \
&& catkin build -j3"
#Setup symbolic link to franka_description inside
#install directory to accommodate PyBullet URDF loader
RUN ln -s /opt/ros/melodic/share/franka_description/ /WorkspaceUoE/install/share/
#Install proprietary OptoForce API
COPY optoforce_linux_api_v1.5.1.tar.gz /tmp/optoforce_linux_api_v1.5.1.tar.gz
RUN cd /tmp/ \
&& tar xvf optoforce_linux_api_v1.5.1.tar.gz \
&& cp -r LINUX_API_V1.5.1/include/omd/ /usr/local/include/ \
&& cp LINUX_API_V1.5.1/lib/* /usr/local/lib/ \
&& rm -rf optoforce_linux_api_v1.5.1.tar.gz LINUX_API_V1.5.1/
#Install proprietary ForceDimension API
COPY forcedimension_linux_sdk_v3.7.3.tar.gz /tmp/forcedimension_linux_sdk_v3.7.3.tar.gz
RUN cd /tmp/ \
&& tar xvf forcedimension_linux_sdk_v3.7.3.tar.gz \
&& cp sdk-3.7.3/include/* /usr/local/include/ \
&& cp sdk-3.7.3/lib/release/lin-x86_64-gcc/* /usr/local/lib/ \
&& rm -rf forcedimension_linux_sdk_v3.7.3.tar.gz sdk-3.7.3
#Install LibTorch C++ API
RUN cd /tmp/ \
&& wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.7.0%2Bcpu.zip \
&& unzip libtorch-cxx11-abi-shared-with-deps-1.7.0+cpu.zip \
&& cp -r libtorch/include/* /usr/local/include/ \
&& cp -r libtorch/lib/* /usr/local/lib/ \
&& cp -r libtorch/share/* /usr/local/share/ \
&& rm -rf libtorch*
#Update entrypoint script
COPY tmp_init_bash.sh /init_bash.sh
ENTRYPOINT ["/bin/bash", "--init-file", "/init_bash.sh"]
Another problem is that when I try to
catkin build
my ros workspace, there’s an error saying:
Could not find a package configuration file provided by
“controller_interface” with any of the following names:
controller_interfaceConfig.cmake
controller_interface-config.cmake
Really appreciate your help!
rimelek
(Ákos Takács)
February 10, 2022, 9:32pm
4
I think @terpz answered your first question. The second question might not be a Docker issue. I don’t know anything about catkin. You need to make sure your configuration files are copied into the image.
I also fixed your post since you acidentally copied the content of your Dockerfile twice.
ruoshi
(Ruoshi)
February 11, 2022, 11:24am
5
Thank you @terpz , I think your suggestion works.
I figured out the problem is caused by the recent update of /osrf/ros:melodic-desktop-full image. This Dockerfile used to work and the workspace could compile. But now it’s not working any more. I still need to find out a solution.