Skip to content
Snippets Groups Projects
Commit 39a4fd8f authored by calrama's avatar calrama
Browse files

[centos] Update python

[windows] Update image url
parent 50d33219
No related branches found
No related tags found
No related merge requests found
Pipeline #61987 failed
......@@ -443,7 +443,6 @@ RUN version=3.7.12 && \
--enable-shared \
--with-ensurepip=install \
--with-system-expat \
--with-system-ffi \
&& \
make -j$(nproc) altinstall && \
cd .. && \
......@@ -451,7 +450,7 @@ RUN version=3.7.12 && \
ldconfig
# Python 3.8
RUN version=3.8.12 && \
RUN version=3.8.19 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
......@@ -463,7 +462,6 @@ RUN version=3.8.12 && \
--enable-shared \
--with-ensurepip=install \
--with-system-expat \
--with-system-ffi \
&& \
make -j$(nproc) altinstall && \
cd .. && \
......@@ -471,7 +469,7 @@ RUN version=3.8.12 && \
ldconfig
# Python 3.9
RUN version=3.9.9 && \
RUN version=3.9.19 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
......@@ -483,13 +481,53 @@ RUN version=3.9.9 && \
--enable-shared \
--with-ensurepip=install \
--with-system-expat \
--with-system-ffi \
&& \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}* && \
ldconfig
# Python 3.10
RUN version=3.10.14 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
tar -xf Python-${version}.tgz && \
cd Python-${version} && \
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
./configure \
--prefix=/usr \
--enable-optimizations \
--enable-shared \
--with-ensurepip=install \
--with-system-expat \
&& \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}* && \
ldconfig
# Python 3.12
RUN version=3.12.5 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
tar -xf Python-${version}.tgz && \
cd Python-${version} && \
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
./configure \
--prefix=/usr \
--enable-optimizations \
--enable-shared \
--with-ensurepip=install \
--with-system-expat \
&& \
make -j$(nproc) && \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}* && \
ldconfig
# Python 3.7 packages
RUN python3.7 -m pip --no-cache-dir install -U pip && \
python3.7 -m pip --no-cache-dir install 'cryptography<3.4' && \
......@@ -538,6 +576,41 @@ RUN python3.9 -m pip --no-cache-dir install -U pip && \
h5py \
deprecation
# Python 3.10 packages
RUN python3.10 -m pip --no-cache-dir install -U pip && \
python3.10 -m pip --no-cache-dir install 'cryptography<3.4' && \
python3.10 -m pip --no-cache-dir install \
wheel \
twine \
pytest \
pytest-cov \
pytest-testmon \
pre-commit \
testbook \
jupyter \
pandas \
h5py \
deprecation
# Python 3.12 packages
RUN python3.12 -m pip --no-cache-dir install -U pip && \
python3.12 -m pip --no-cache-dir install 'cryptography<3.4' && \
python3.12 -m pip --no-cache-dir install \
wheel \
twine \
pytest \
pytest-cov \
pytest-testmon \
pre-commit \
testbook \
jupyter \
pandas \
h5py \
deprecation
# Remove non-vault yum repos
RUN rm /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-SCLo-scl.repo /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
# Additional development dependencies
RUN yum install -y \
patchelf \
......@@ -546,9 +619,11 @@ RUN yum install -y \
&& \
yum clean all
# Portable Python 3.8
# Install portable python dependencies
ADD python/make-python-portable.py /usr/local/bin/make-python-portable.py
RUN version=3.8.12 && \
# Portable Python 3.8
RUN version=3.8.19 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
......@@ -563,19 +638,12 @@ RUN version=3.8.12 && \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}*
ADD python/make-python-portable.py /usr/local/bin/make-python-portable.py
RUN yum install -y patchelf && \
yum clean all && \
source /etc/profile && \
RUN source /etc/profile && \
make-python-portable.py /opt/python/3.8/bin/python3.8
RUN tar -C /opt/python/3.8/ --numeric-owner --xattrs --xattrs-include='*' -cf /opt/python/python-3.8.tar .
# Portable Python 3.10
RUN version=3.10.2 && \
RUN version=3.10.14 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
......@@ -591,8 +659,28 @@ RUN version=3.10.2 && \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}*
RUN source /etc/profile && \
make-python-portable.py /opt/python/3.10/bin/python3.10
RUN tar -C /opt/python/3.10/ --numeric-owner --xattrs --xattrs-include='*' -cf /opt/python/python-3.10.tar .
# Portable Python 3.12
RUN version=3.12.5 && \
source /etc/profile && \
cd /tmp && \
curl -sSLO https://www.python.org/ftp/python/${version}/Python-${version}.tgz && \
tar -xf Python-${version}.tgz && \
cd Python-${version} && \
sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure && \
CFLAGS="-fPIC" LDFLAGS="-fPIC" ./configure \
--prefix=/opt/python/3.12 \
--enable-optimizations \
--enable-shared \
--with-ensurepip=install \
&& \
make -j$(nproc) && \
make -j$(nproc) altinstall && \
cd .. && \
rm -rf Python-${version}*
RUN source /etc/profile && \
make-python-portable.py /opt/python/3.12/bin/python3.12
RUN tar -C /opt/python/3.12/ --numeric-owner --xattrs --xattrs-include='*' -cf /opt/python/python-3.12.tar .
# SPDX-License-Identifier: GPL-3.0-or-later
FROM microsoft/dotnet-framework:3.5-runtime
FROM mcr.microsoft.com/dotnet/framework/runtime:3.5
LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment