Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfiles #1527

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions ci/docker/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
FROM ubuntu:14.04

ARG DEBIAN_FRONTEND=noninteractive
ARG USER_UID=1001
ENV TZ=Europe/Paris

# 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 \
nano \
net-tools \
software-properties-common \
sudo \
tzdata \
vim \
wget \
&& apt-get clean

# 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

# Update aptitude with other optional ViSP 3rd parties
RUN apt-get update \
&& apt-get install -y \
libcoin80-dev \
libjpeg-dev \
libpng-dev \
libogre-1.9-dev \
libois-dev \
libdmtx-dev \
&& apt-get clean

# 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 ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Download cmake 3.32.2 linux-x86_64
RUN mkdir -p ${VISP_WS}/3rdparty/cmake \
&& cd ${VISP_WS}/3rdparty/cmake \
&& curl -SLO https://github.com/Kitware/CMake/archive/refs/tags/v3.10.0.tar.gz \
&& tar xvzf v3.10.0.tar.gz \
&& cd CMake-3.10.0 \
&& sh bootstrap --prefix=/usr \
&& make -j$(nproc) \
&& sudo make install

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

# Build visp
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j$(nproc)

CMD ["/bin/bash"]
111 changes: 111 additions & 0 deletions ci/docker/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
FROM ubuntu:16.04

ARG DEBIAN_FRONTEND=noninteractive
ARG USER_UID=1001
ENV TZ=Europe/Paris

# 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

# 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

# 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

# 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 ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc

# Download cmake 3.32.2 linux-x86_64
RUN mkdir -p ${VISP_WS}/3rdparty/cmake \
&& cd ${VISP_WS}/3rdparty/cmake \
&& curl -SLO https://github.com/Kitware/CMake/releases/download/v3.31.2/cmake-3.31.2-linux-x86_64.sh \
&& sudo sh cmake-3.31.2-linux-x86_64.sh --prefix=/usr --skip-license

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

# Build visp
RUN cd ${VISP_WS} \
&& mkdir visp-build \
&& cd visp-build \
&& cmake ../visp \
&& make -j$(nproc)

CMD ["/bin/bash"]
8 changes: 4 additions & 4 deletions ci/docker/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ 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
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -82,11 +82,11 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

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

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
10 changes: 5 additions & 5 deletions ci/docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,14 +83,14 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

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

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

# Install visp-images
RUN mkdir -p ${HOME}/visp-ws \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
11 changes: 7 additions & 4 deletions ci/docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,11 +83,14 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1
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 \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& echo "export VISP_INPUT_IMAGE_PATH=${HOME}/visp-ws/visp-images" >> ${HOME}/.bashrc
Expand Down
15 changes: 9 additions & 6 deletions ci/docker/ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ 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
ENV USERNAME=vispci

RUN useradd -U --uid $USER_UID -ms /bin/bash ${USERNAME} \
&& echo "${USERNAME}:${USERNAME}" | chpasswd \
Expand All @@ -83,21 +83,24 @@ USER ${USERNAME}
WORKDIR /home/$USERNAME

# Some apps don't show controls without this
ENV QT_X11_NO_MITSHM 1
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 \
&& cd ${HOME}/visp-ws \
RUN mkdir -p ${VISP_WS} \
&& cd ${VISP_WS} \
&& git clone https://github.com/lagadic/visp-images.git \
&& echo "export VISP_WS=${HOME}/visp-ws" >> ${HOME}/.bashrc \
&& 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 \
Expand Down
Loading