Skip to content
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
80 changes: 32 additions & 48 deletions docker/sofabuilder_fedora/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
FROM fedora:36
FROM fedora:41

SHELL ["/bin/bash", "-c"]

ADD "https://www.sofa-framework.org/rand/" ForceNoCache

RUN useradd --no-log-init ci --uid 1000 --home /home/ci --create-home --shell /bin/bash
ENV HOME="/home/ci"

# Install yum repositories
# RUN yum install -y -q deltarpm
# RUN yum install -y -q epel-release
# RUN yum install -y -q centos-release-scl
# RUN yum install -y -q centos-release-scl-rh
# RUN yum install -y -q http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-5.el7.noarch.rpm
# RUN yum install -y -q https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm
RUN yum install -y -q http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-36.noarch.rpm
RUN yum update -y && yum upgrade -y && yum clean all
# Install dnf repositories
# RUN dnf install -y -q deltarpm
# RUN dnf install -y -q epel-release
# RUN dnf install -y -q centos-release-scl
# RUN dnf install -y -q centos-release-scl-rh
# RUN dnf install -y -q http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-5.el7.noarch.rpm
# RUN dnf install -y -q https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.9-1.x86_64.rpm
RUN dnf install -y -q http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
RUN dnf update -y && dnf upgrade -y && dnf clean all

# Install system tools
RUN yum install -y -q \
RUN dnf install -y -q \
dnf-utils \
git \
gh \
Expand All @@ -28,25 +26,27 @@ RUN yum install -y -q \
vim

# Install build tools
RUN yum install -y -q \
RUN dnf install -y -q \
ninja-build \
clang \
ccache \
libXdamage

# Install core deps
RUN yum install -y -q \
RUN dnf install -y -q \
glew-devel \
freeglut-devel \
zlib-devel \
eigen3-devel

# Install plugin deps
RUN yum install -y -q \
python2.7 \
python3.10 \
python3.11 \
python3.12 \
RUN dnf install -y -q \
python3.12-devel \
python3-pip \
python3.13 \
python3.13-devel \
python3.14 \
python3.14-devel \
libpng-devel libjpeg-turbo-devel libtiff-devel \
blas-devel \
lapack-devel \
Expand All @@ -61,46 +61,31 @@ RUN yum install -y -q \


# Install pip, numpy, scipy, pybind11
ARG PYBIND11_VERSION=2.11.1
RUN python3.10 -m ensurepip --upgrade \
&& python3.10 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable Cheetah3
RUN python3.11 -m ensurepip --upgrade \
&& python3.11 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION rpyc prettytable Cheetah3
RUN python3.12 -m ensurepip --upgrade \
&& python3.12 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION rpyc prettytable Cheetah3
ARG PYBIND11_VERSION=3.0.1
RUN python3.12 -m ensurepip
RUN python3.12 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
RUN python3.13 -m ensurepip
RUN python3.13 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
RUN python3.14 -m ensurepip
RUN python3.14 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
ENV PYTHONPATH=""
ENV VM_HAS_ASSIMP="true"
ENV VM_HAS_OPENCASCADE="false"

###################################

# Install CMake
ARG CMAKE_VERSION=3.22.1
ARG CMAKE_VERSION=3.28.3
ADD https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.sh /tmp/cmake.sh
RUN chmod a+x /tmp/cmake.sh
RUN /tmp/cmake.sh --skip-license --prefix=/usr/local

# Install Boost
RUN yum install -y -q boost-devel
RUN dnf install -y -q boost-devel
ENV BOOST_INCLUDEDIR="/usr/include"
ENV BOOST_LIBRARYDIR="/usr/lib64/boost"
ENV LD_LIBRARY_PATH="${BOOST_LIBRARYDIR}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"

# Install CGAL
# Due to dependencies on Boost and Qt, we have to build CGAL
ARG CGAL_VERSION=5.4.5
ADD https://github.com/CGAL/cgal/releases/download/v$CGAL_VERSION/CGAL-$CGAL_VERSION.tar.xz /tmp/CGAL.tar.xz
RUN yum install -y -q gmp-devel mpfr-devel
RUN tar -xJf /tmp/CGAL.tar.xz --directory /tmp \
&& cd /tmp/CGAL-$CGAL_VERSION \
&& mkdir build \
&& cd build \
&& source /opt/rh/devtoolset-7/enable || true \
&& source /opt/rh/llvm-toolset-7/enable || true \
&& cmake -DCMAKE_BUILD_TYPE=Release -DWITH_CGAL_Core=TRUE -DWITH_CGAL_ImageIO=TRUE -DWITH_CGAL_Qt5=TRUE .. \
&& make --silent install
ENV VM_HAS_CGAL="true"
ENV VM_CGAL_PATH="/usr/local/lib64/cmake/CGAL"

###################################

Expand All @@ -114,17 +99,16 @@ WORKDIR /builds
ENV PYTHONIOENCODING="UTF-8"
ENV PYTHONUSERBASE="/tmp/pythonuserbase"
RUN mkdir -p "$PYTHONUSERBASE" && chmod -R 777 "$PYTHONUSERBASE"
ENV VM_PYTHON_EXECUTABLE="/usr/bin/python2.7"
ENV VM_PYTHON3_EXECUTABLE="/usr/bin/python3.10"
ENV VM_PYBIND11_CONFIG_EXECUTABLE="/usr/bin/python3.10 -m pybind11"
ENV VM_PYTHON3_EXECUTABLE="/usr/bin/python3.12"
ENV VM_PYBIND11_CONFIG_EXECUTABLE="/usr/bin/python3.12 -m pybind11"
RUN git config --system user.name 'SOFA Bot' || git config --global user.name 'SOFA Bot'
RUN git config --system user.email '<>' || git config --global user.email '<>'

# TMP: fix Boost+CMake issue with a symlink
RUN ln -s /usr/include /include || true

# Cleanup
RUN yum clean all \
RUN dnf clean all \
&& rm -rf /tmp/*

# In-process env settings
Expand Down
81 changes: 29 additions & 52 deletions docker/sofabuilder_ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

SHELL ["/bin/bash", "-c"]

ADD "https://www.sofa-framework.org/rand/" ForceNoCache

RUN useradd --no-log-init ci --uid 1000 --home /home/ci --create-home --shell /bin/bash
ENV HOME="/home/ci"

# Install APT tools and repos
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y \
Expand All @@ -27,92 +24,73 @@ RUN apt-get install -y \
ca-certificates \
zip \
unzip \
cmake \
patchelf

# Install build tools
RUN apt-get install -y \
build-essential \
ninja-build=1.10.\* \
gcc=4:11.\* \
g++=4:11.\* \
clang=1:14.0-\* \
ccache=4.5.\*
ninja-build=1.11.\* \
gcc=4:13.\* \
g++=4:13.\* \
clang=1:18.0-\* \
ccache

# Install core deps
RUN apt-get install -y \
libboost-all-dev=1.74.\* \
libboost-all-dev=1.83.\* \
libglew-dev=2.2.\* \
freeglut3-dev=2.8.\* \
zlib1g-dev=1:1.2.\* \
freeglut3-dev=3.4.\* \
zlib1g-dev=1:1.3.\* \
libeigen3-dev=3.4.\*

# Install plugins deps
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get install -y \
python2.7-dev \
python3.10-dev python3.10-distutils \
python3.11-dev python3.11-distutils \
python3.12-dev \
python3-pip \
python3.13 \
python3.13-dev \
python3.14 \
python3.14-dev \
libpng-dev libjpeg-dev libtiff-dev \
libblas-dev \
liblapack-dev \
libsuitesparse-dev \
libavcodec-dev libavformat-dev libavutil-dev libswscale-dev \
libassimp-dev \
liboce-ocaf-dev \
libzmq3-dev liboscpack-dev \
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev \
libtinyxml2-dev \
xorg-dev\
libgtk-3-dev



ENV VM_BUILDS_IMGUI="true"
# Install pip, numpy, scipy, pybind11
ARG PYBIND11_VERSION=2.12.0
RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \
&& python3.10 /tmp/get-pip3.py \
&& python3.10 -m pip install --upgrade pip \
&& python3.10 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable Cheetah3
RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \
&& python3.11 /tmp/get-pip3.py \
&& python3.11 -m pip install --upgrade pip \
&& python3.11 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable Cheetah3
RUN curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \
&& python3.12 /tmp/get-pip3.py \
&& python3.12 -m pip install --upgrade pip \
&& python3.12 -m pip install numpy==1.26.4 scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable Cheetah3
ARG PYBIND11_VERSION=3.0.1
RUN python3.12 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
RUN python3.13 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
RUN python3.14 -m pip install numpy scipy matplotlib pybind11==$PYBIND11_VERSION mypy pybind11-stubgen rpyc prettytable ct3 --break-system-packages
ENV VM_HAS_ASSIMP="true"
ENV VM_HAS_OPENCASCADE="true"

###################################

# Install CMake
ARG CMAKE_VERSION=3.22.1
ARG CMAKE_VERSION=3.28.3
ADD https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.sh /tmp/cmake.sh
RUN chmod a+x /tmp/cmake.sh
RUN /tmp/cmake.sh --skip-license --prefix=/usr/local


# Install CGAL
# Due to dependencies on Boost and Qt, we have to build CGAL
ARG CGAL_VERSION=5.4.5
ADD https://github.com/CGAL/cgal/releases/download/v$CGAL_VERSION/CGAL-$CGAL_VERSION.tar.xz /tmp/CGAL.tar.xz
RUN apt-get install -y libgmp-dev libmpfr-dev
RUN tar -xJf /tmp/CGAL.tar.xz --directory /tmp \
&& cd /tmp/CGAL-$CGAL_VERSION \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DWITH_CGAL_Core=TRUE -DWITH_CGAL_ImageIO=TRUE -DWITH_CGAL_Qt5=TRUE .. \
&& make --silent install
ENV VM_HAS_CGAL="true"
ENV VM_CGAL_PATH="/usr/local/lib/cmake/CGAL"

###################################
#
# Install CUDA
ENV DEBIAN_FRONTEND noninteractive
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
RUN dpkg -i cuda-keyring_1.0-1_all.deb
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
RUN dpkg -i cuda-keyring_1.1-1_all.deb
RUN apt-get update
RUN apt-get -y install cuda-toolkit-12-2
RUN apt-get -y install cuda-toolkit-12-9
ENV VM_HAS_CUDA="true"
ENV PATH=$PATH:/usr/local/cuda/bin

Expand All @@ -129,9 +107,8 @@ WORKDIR /builds
ENV PYTHONIOENCODING="UTF-8"
ENV PYTHONUSERBASE="/tmp/pythonuserbase"
RUN mkdir -p "$PYTHONUSERBASE" && chmod -R 777 "$PYTHONUSERBASE"
ENV VM_PYTHON_EXECUTABLE="/usr/bin/python2.7"
ENV VM_PYTHON3_EXECUTABLE="/usr/bin/python3.10"
ENV VM_PYBIND11_CONFIG_EXECUTABLE="/usr/bin/python3.10 -m pybind11"
ENV VM_PYTHON3_EXECUTABLE="/usr/bin/python3.12"
ENV VM_PYBIND11_CONFIG_EXECUTABLE="/usr/bin/python3.12 -m pybind11"
RUN git config --system user.name 'SOFA Bot' || git config --global user.name 'SOFA Bot'
RUN git config --system user.email '<>' || git config --global user.email '<>'

Expand Down
2 changes: 1 addition & 1 deletion scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ if [ -e "$python3_exec" ] && [ -e "$python3_lib" ] && [ -e "$python3_include" ];
add-cmake-option "-DPython3_INCLUDE_DIR=$python3_include"
fi
if [ -n "$VM_PYBIND11_CONFIG_EXECUTABLE" ]; then
pybind11_cmakedir="$($VM_PYBIND11_CONFIG_EXECUTABLE --cmakedir)"
pybind11_cmakedir="$("$VM_PYTHON3_EXECUTABLE" -c "import pybind11; print(pybind11.get_cmake_dir())")"
if vm-is-windows; then
pybind11_cmakedir="$(cd "$pybind11_cmakedir" && pwd -W)"
fi
Expand Down
5 changes: 2 additions & 3 deletions scripts/env/consortium-macos-2
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ export VM_HAS_CUDA="false"
export VM_HAS_OPENCASCADE="false"


export VM_QT_PATH="/opt/homebrew/Cellar/qt@5/5.15.13/"

x86_root="/usr/local"
arm_root="/opt/homebrew"
export VM_PYTHON_EXECUTABLE=""
export VM_PYTHON_PYTHONPATH=""
export VM_PYTHON3_EXECUTABLE="$arm_root/opt/python@3.10/bin/python3.10"
export VM_PYTHON3_PYTHONPATH="$arm_root/lib/python3.10/site-packages"
export VM_PYTHON3_EXECUTABLE="$arm_root/opt/python@3.12/bin/python3.12"
export VM_PYTHON3_PYTHONPATH="$arm_root/lib/python3.12/site-packages"
if [[ -n "$CI_PYTHON3_VERSION" ]] &&
[[ -e "$x86_root/opt/python@$CI_PYTHON3_VERSION/bin/python$CI_PYTHON3_VERSION" ]] &&
[[ -e "$x86_root/lib/python$CI_PYTHON3_VERSION/site-packages" ]]; then
Expand Down
5 changes: 2 additions & 3 deletions scripts/env/consortium-macos-3
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ export VM_HAS_CUDA="false"
export VM_HAS_OPENCASCADE="false"


export VM_QT_PATH="/Users/ci/Qt/5.12.12"

x86_root="/usr/local"
export VM_PYTHON_EXECUTABLE=""
export VM_PYTHON_PYTHONPATH=""
export VM_PYTHON3_EXECUTABLE="$x86_root/opt/python@3.10/bin/python3.10"
export VM_PYTHON3_PYTHONPATH="$x86_root/lib/python3.10/site-packages"
export VM_PYTHON3_EXECUTABLE="$x86_root/opt/python@3.12/bin/python3.12"
export VM_PYTHON3_PYTHONPATH="$x86_root/lib/python3.12/site-packages"
if [[ -n "$CI_PYTHON3_VERSION" ]] &&
[[ -e "$x86_root/opt/python@$CI_PYTHON3_VERSION/bin/python$CI_PYTHON3_VERSION" ]] &&
[[ -e "$x86_root/lib/python$CI_PYTHON3_VERSION/site-packages" ]]; then
Expand Down
48 changes: 0 additions & 48 deletions scripts/env/sofa-ci-dev-ubuntu2204-2

This file was deleted.

Loading