Skip to content

Commit

Permalink
Merge branch 'master' into fix_ci_ubuntu_dep_src
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGNEAU Romain committed Jul 4, 2024
2 parents fed7bfc + b5f1d9a commit 2580c2d
Show file tree
Hide file tree
Showing 37 changed files with 786 additions and 314 deletions.
3 changes: 2 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ ViSP 3.x.x (Version in development)
. New tutorials in tutorial/segmentation/color folder to show how to use HSV color segmentation to
extract the corresponding point cloud
. New scene renderer based on Panda3D. See inheritance diagram for vpPanda3DBaseRenderer class and corresponding
tutorial.
tutorial
. New docker image for Ubuntu 24.04 in docker folder
- Applications
. Migrate eye-to-hand tutorials in apps
- Tutorials
Expand Down
126 changes: 81 additions & 45 deletions ci/docker/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,88 @@
FROM ubuntu:18.04
MAINTAINER Fabien Spindler <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive
ARG VISPCI_USER_UID=1001
ARG DOCKER_GROUP_GID=130
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with new repo
RUN apt-get update
# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
mercurial \
nano \
net-tools \
python3 \
python3-dev \
python3-pip \
python3-dbg \
python3-empy \
python3-numpy \
python3-pip \
python3-psutil \
python3-venv \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Install packages
RUN apt-get install -y \
sudo \
build-essential \
cmake \
git \
net-tools \
iputils-ping \
# Recommended ViSP 3rd parties
libopencv-dev \
libx11-dev \
liblapack-dev \
libeigen3-dev \
libdc1394-22-dev \
libv4l-dev \
libzbar-dev \
libpthread-stubs0-dev \
# Other optional 3rd parties
libpcl-dev \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev
# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
&& apt-get clean

RUN adduser --disabled-password --gecos "" --uid $VISPCI_USER_UID vispci \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo vispci \
&& usermod -aG docker vispci \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers \
&& adduser vispci video
# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libpcl-dev \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev \
&& apt-get clean

ENV HOME=/home/vispci
# Set Locale
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
Expand All @@ -54,16 +92,14 @@ RUN mkdir -p ${HOME}/visp-ws \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Get visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp

# Build visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j4

USER vispci
&& make -j$(nproc)

WORKDIR /home/vispci
CMD ["/bin/bash"]
130 changes: 85 additions & 45 deletions ci/docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,92 @@
FROM ubuntu:20.04
MAINTAINER Fabien Spindler <[email protected]>

ARG DEBIAN_FRONTEND=noninteractive
ARG VISPCI_USER_UID=1001
ARG DOCKER_GROUP_GID=130
ARG USER_UID=1001
ENV TZ=Europe/Paris

# Update aptitude with new repo
RUN apt-get update
# Update aptitude with default packages
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
cmake-curses-gui \
curl \
gedit \
gdb \
git \
iputils-ping \
locales \
locate \
lsb-release \
mercurial \
nano \
net-tools \
python3 \
python3-dev \
python3-pip \
python3-dbg \
python3-empy \
python3-numpy \
python3-pip \
python3-psutil \
python3-venv \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# Install packages
RUN apt-get install -y \
sudo \
build-essential \
cmake \
git \
net-tools \
iputils-ping \
# Recommended ViSP 3rd parties
libopencv-dev \
libx11-dev \
liblapack-dev \
libeigen3-dev \
libdc1394-22-dev \
libv4l-dev \
libzbar-dev \
libpthread-stubs0-dev \
# Other optional 3rd parties
libpcl-dev \
libcoin-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
libgsl-dev
# Update aptitude with recommended ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libdc1394-22-dev \
libeigen3-dev \
liblapack-dev \
libopencv-dev \
libv4l-dev \
libx11-dev \
libzbar-dev \
nlohmann-json3-dev \
&& apt-get clean

RUN adduser --disabled-password --gecos "" --uid $VISPCI_USER_UID vispci \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo vispci \
&& usermod -aG docker vispci \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers \
&& adduser vispci video
# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libcoin-dev \
libdmtx-dev \
libgsl-dev \
libjpeg-dev \
libogre-1.9-dev \
libois-dev \
libpcl-dev \
libpng-dev \
&& apt-get clean

ENV HOME=/home/vispci
# Set Locale
RUN locale-gen en_US en_US.UTF-8 && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \
export LANG=en_US.UTF-8

ENV USERNAME vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
&& adduser ${USERNAME} sudo \
&& echo "$USERNAME ALL=NOPASSWD: ALL" >> /etc/sudoers.d/${USERNAME} \
&& adduser ${USERNAME} video

# Commands below are now run as normal user
USER ${USERNAME}

# When running a container start in the home folder
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1

# Create visp workspace
ENV VISP_WS /home/$USERNAME/visp-ws

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
Expand All @@ -54,16 +96,14 @@ RUN mkdir -p ${HOME}/visp-ws \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Get visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp

# Build visp
RUN cd ${HOME}/visp-ws \
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j4

USER vispci
&& make -j$(nproc)

WORKDIR /home/vispci
CMD ["/bin/bash"]
Loading

0 comments on commit 2580c2d

Please sign in to comment.