Skip to content

Commit

Permalink
Move to manylinux_2_28 base image
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Jan 10, 2025
1 parent 74dcdd5 commit 952d3d9
Showing 1 changed file with 8 additions and 46 deletions.
54 changes: 8 additions & 46 deletions packaging/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG MANYLINUX_IMAGE=manylinux2014_x86_64
ARG MANYLINUX_IMAGE=manylinux_2_28_x86_64

FROM quay.io/pypa/$MANYLINUX_IMAGE
LABEL authors="Pramod Kumbhar, Fernando Pereira, Alexandru Savulescu"
LABEL authors="Pramod Kumbhar, Fernando Pereira, Alexandru Savulescu, Goran Jelic-Cizmek"

RUN gcc --version && python --version
RUN gcc --version && python3 --version

# install basic packages
RUN yum -y install \
Expand All @@ -13,6 +13,11 @@ RUN yum -y install \
vim \
curl \
unzip \
flex \
readline \
ncurses \
mpich \
openmpi \
bison \
autoconf \
automake \
Expand All @@ -28,47 +33,6 @@ RUN yum -y install \

WORKDIR /root

# newer flex with rpmbuild (manylinux2014 based on Centos7 currently has flex < 2.6)
RUN rpmbuild --rebuild https://vault.centos.org/8-stream/AppStream/Source/SPackages/flex-2.6.1-9.el8.src.rpm \
&& yum -y install rpmbuild/RPMS/*/flex-2.6.1-9.el7.*.rpm \
&& rm -rf rpmbuild

RUN wget http://ftpmirror.gnu.org/ncurses/ncurses-6.4.tar.gz \
&& tar -xvzf ncurses-6.4.tar.gz \
&& cd ncurses-6.4 \
&& ./configure --prefix=/nrnwheel/ncurses --without-shared --without-debug CFLAGS="-fPIC" \
&& make -j install \
&& cd .. && rm -rf ncurses-6.4 ncurses-6.4.tar.gz

RUN curl -L -o mpich-3.3.2.tar.gz http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz \
&& tar -xvzf mpich-3.3.2.tar.gz \
&& cd mpich-3.3.2 \
&& ./configure --disable-fortran --prefix=/nrnwheel/mpich \
&& make -j install \
&& cd .. && rm -rf mpich-3.3.2 mpich-3.3.2.tar.gz \
&& rm -rf /nrnwheel/mpich/share/doc /nrnwheel/mpich/share/man

RUN curl -L -o openmpi-4.0.3.tar.gz https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz \
&& tar -xvzf openmpi-4.0.3.tar.gz \
&& cd openmpi-4.0.3 \
&& ./configure --prefix=/nrnwheel/openmpi \
&& make -j install \
&& cd .. && rm -rf openmpi-4.0.3 openmpi-4.0.3.tar.gz

RUN curl -L -o readline-7.0.tar.gz https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz \
&& tar -xvzf readline-7.0.tar.gz \
&& cd readline-7.0 \
&& ./configure --prefix=/nrnwheel/readline --disable-shared CFLAGS="-fPIC" \
&& make -j install \
&& cd .. && rm -rf readline-7.0 readline-7.0.tar.gz

# create readline with ncurses
RUN cd /nrnwheel/readline/lib \
&& ar -x libreadline.a \
&& ar -x ../../ncurses/lib/libncurses.a \
&& ar cq libreadline.a *.o \
&& rm *.o

# NOTE: NMODL transpiler is used in during build step but it requires
# sympy+python available in order to translate MOD files to C++. But under
# manylinux container, Python (libpython) is not available and hence we can't
Expand All @@ -83,9 +47,7 @@ RUN curl -L -o Python-3.10.0.tar.gz https://www.python.org/ftp/python/3.10.0/Pyt
&& make -j altinstall \
&& cd .. && rm -rf Python-3.10.0 Python-3.10.0.tar.gz

ENV PATH /nrnwheel/openmpi/bin:$PATH
RUN yum -y install epel-release libX11-devel libXcomposite-devel vim-enhanced && yum -y clean all && rm -rf /var/cache
RUN yum -y remove ncurses-devel

# Copy Dockerfile for reference
COPY Dockerfile .
Expand Down

0 comments on commit 952d3d9

Please sign in to comment.