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

[centos] add portable python 3.10

parent 7e327279
No related branches found
No related tags found
No related merge requests found
Pipeline #46426 failed
......@@ -578,3 +578,37 @@ RUN /opt/python/3.8/bin/python3.8 -m pip --no-cache-dir install -U pip && \
h5py
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 && \
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} && \
CFLAGS="-fPIC" LDFLAGS="-fPIC" ./configure \
--prefix=/opt/python/3.10 \
--enable-optimizations \
--enable-shared \
--with-ensurepip=install \
&& \
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 && \
make-python-portable.py /opt/python/3.10/bin/python3.10
RUN /opt/python/3.10/bin/python3.10 -m pip --no-cache-dir install -U pip && \
/opt/python/3.10/bin/python3.10 -m pip --no-cache-dir install 'cryptography<3.4' && \
/opt/python/3.10/bin/python3.10 -m pip --no-cache-dir install \
PySide2==5.15.2 \
'numpy<1.22' \
h5py
RUN tar -C /opt/python/3.10/ --numeric-owner --xattrs --xattrs-include='*' -cf /opt/python/python-3.10.tar .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment