Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
Closed
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
2 changes: 1 addition & 1 deletion common/install_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ wget -q -O ${OPENSSL}.tar.gz https://www.openssl.org/source/${OPENSSL}.tar.gz
tar xf ${OPENSSL}.tar.gz
cd ${OPENSSL}
./config -d '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)'
make install
make install_sw # Only install the OpenSSL software components.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need man pages

cd ..
rm -rf ${OPENSSL}
26 changes: 21 additions & 5 deletions conda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ FROM base as patchelf
ADD ./common/install_patchelf.sh install_patchelf.sh
RUN bash ./install_patchelf.sh && rm install_patchelf.sh && cp $(which patchelf) /patchelf

FROM base as openssl
# Install openssl
ADD ./common/install_openssl.sh install_openssl.sh
RUN bash ./install_openssl.sh && rm install_openssl.sh

FROM base as conda
# Install Anaconda
ADD ./common/install_conda.sh install_conda.sh
Expand Down Expand Up @@ -75,6 +70,11 @@ FROM base as mnist
ADD ./common/install_mnist.sh install_mnist.sh
RUN bash ./install_mnist.sh

FROM base as openssl
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put if after MNIST because MNIST is not available

# Install openssl
ADD ./common/install_openssl.sh install_openssl.sh
RUN bash ./install_openssl.sh && rm install_openssl.sh

FROM base as all_cuda
COPY --from=cuda9.2 /usr/local/cuda-9.2 /usr/local/cuda-9.2
COPY --from=cuda10.1 /usr/local/cuda-10.1 /usr/local/cuda-10.1
Expand All @@ -97,3 +97,19 @@ RUN chmod o+rw /usr/local
RUN touch /.condarc && \
chmod o+rw /.condarc && \
chmod -R o+rw /opt/conda

COPY --from=openssl /usr/local/lib64/libcrypto.so.1.1 /usr/local/lib64/libcrypto.so.1.1
COPY --from=openssl /usr/local/lib64/libssl.so.1.1 /usr/local/lib64/libssl.so.1.1
COPY --from=openssl /usr/local/include/openssl/* /usr/local/include/openssl/
COPY --from=openssl /usr/local/lib64/libcrypto.a /usr/local/lib64/libcrypto.a
COPY --from=openssl /usr/local/lib64/libssl.a /usr/local/lib64/libssl.a
COPY --from=openssl /usr/local/lib64/pkgconfig/libcrypto.pc /usr/local/lib64/pkgconfig/libcrypto.pc
COPY --from=openssl /usr/local/lib64/pkgconfig/libssl.pc /usr/local/lib64/pkgconfig/libssl.pc
COPY --from=openssl /usr/local/lib64/pkgconfig/openssl.pc /usr/local/lib64/pkgconfig/openssl.pc
COPY --from=openssl /usr/local/lib64/engines-1.1/afalg.so /usr/local/lib64/engines-1.1/afalg.so
COPY --from=openssl /usr/local/lib64/engines-1.1/capi.so /usr/local/lib64/engines-1.1/capi.so
COPY --from=openssl /usr/local/lib64/engines-1.1/padlock.so /usr/local/lib64/engines-1.1/padlock.so
COPY --from=openssl /usr/local/bin/openssl /usr/local/bin/openssl
COPY --from=openssl /usr/local/bin/c_rehash /usr/local/bin/c_rehash
RUN ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/local/lib64/libcrypto.so
RUN ln -s /usr/local/lib64/libssl.so.1.1 /usr/local/lib64/libssl.so
17 changes: 17 additions & 0 deletions libtorch/ubuntu16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

FROM base as openssl
# Install openssl
ADD ./common/install_openssl.sh install_openssl.sh
RUN bash ./install_openssl.sh && rm install_openssl.sh
Expand Down Expand Up @@ -64,3 +65,19 @@ COPY --from=intel /opt/intel /opt/intel
# Install Anaconda
COPY --from=conda /opt/conda /opt/conda
ENV PATH /opt/conda/bin:$PATH

COPY --from=openssl /usr/local/lib/libcrypto.so.1.1 /usr/local/lib/libcrypto.so.1.1
COPY --from=openssl /usr/local/lib/libssl.so.1.1 /usr/local/lib/libssl.so.1.1
COPY --from=openssl /usr/local/include/openssl/* /usr/local/include/openssl/
COPY --from=openssl /usr/local/lib/libcrypto.a /usr/local/lib/libcrypto.a
COPY --from=openssl /usr/local/lib/libssl.a /usr/local/lib/libssl.a
COPY --from=openssl /usr/local/lib/pkgconfig/libcrypto.pc /usr/local/lib/pkgconfig/libcrypto.pc
COPY --from=openssl /usr/local/lib/pkgconfig/libssl.pc /usr/local/lib/pkgconfig/libssl.pc
COPY --from=openssl /usr/local/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/openssl.pc
COPY --from=openssl /usr/local/lib/engines-1.1/afalg.so /usr/local/lib/engines-1.1/afalg.so
COPY --from=openssl /usr/local/lib/engines-1.1/capi.so /usr/local/lib/engines-1.1/capi.so
COPY --from=openssl /usr/local/lib/engines-1.1/padlock.so /usr/local/lib/engines-1.1/padlock.so
COPY --from=openssl /usr/local/bin/openssl /usr/local/bin/openssl
COPY --from=openssl /usr/local/bin/c_rehash /usr/local/bin/c_rehash
RUN ln -s /usr/local/lib/libcrypto.so.1.1 /usr/local/lib/libcrypto.so
RUN ln -s /usr/local/lib/libssl.so.1.1 /usr/local/lib/libssl.so
15 changes: 15 additions & 0 deletions manywheel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,21 @@ RUN yum install -y \
RUN yum swap -y git git224-core

ENV SSL_CERT_FILE=/opt/_internal/certs.pem
COPY --from=python /usr/local/lib64/libcrypto.so.1.1 /usr/local/lib64/libcrypto.so.1.1
COPY --from=python /usr/local/lib64/libssl.so.1.1 /usr/local/lib64/libssl.so.1.1
COPY --from=python /usr/local/include/openssl/* /usr/local/include/openssl/
COPY --from=python /usr/local/lib64/libcrypto.a /usr/local/lib64/libcrypto.a
COPY --from=python /usr/local/lib64/libssl.a /usr/local/lib64/libssl.a
COPY --from=python /usr/local/lib64/pkgconfig/libcrypto.pc /usr/local/lib64/pkgconfig/libcrypto.pc
COPY --from=python /usr/local/lib64/pkgconfig/libssl.pc /usr/local/lib64/pkgconfig/libssl.pc
COPY --from=python /usr/local/lib64/pkgconfig/openssl.pc /usr/local/lib64/pkgconfig/openssl.pc
COPY --from=python /usr/local/lib64/engines-1.1/afalg.so /usr/local/lib64/engines-1.1/afalg.so
COPY --from=python /usr/local/lib64/engines-1.1/capi.so /usr/local/lib64/engines-1.1/capi.so
COPY --from=python /usr/local/lib64/engines-1.1/padlock.so /usr/local/lib64/engines-1.1/padlock.so
COPY --from=python /usr/local/bin/openssl /usr/local/bin/openssl
COPY --from=python /usr/local/bin/c_rehash /usr/local/bin/c_rehash
RUN ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/local/lib64/libcrypto.so
RUN ln -s /usr/local/lib64/libssl.so.1.1 /usr/local/lib64/libssl.so
COPY --from=python /opt/python /opt/python
COPY --from=python /opt/_internal /opt/_internal
COPY --from=python /opt/python/cp36-cp36m/bin/auditwheel /usr/local/bin/auditwheel
Expand Down
8 changes: 8 additions & 0 deletions manywheel/build_scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ set -ex
# Python versions to be installed in /opt/$VERSION_NO
CPYTHON_VERSIONS=${CPYTHON_VERSIONS:-"3.6.6 3.7.5 3.8.1 3.9.0"}

# openssl version to build, with expected sha256 hash of .tar.gz
# archive
OPENSSL_ROOT=openssl-1.1.1k
OPENSSL_HASH=892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
DEVTOOLS_HASH=a8ebeb4bed624700f727179e6ef771dafe47651131a00a78b342251415646acc
PATCHELF_HASH=d9afdff4baeacfbc64861454f368b7f2c15c44d245293f7587bbf726bfe722fb
CURL_ROOT=curl-7.49.1
Expand Down Expand Up @@ -36,6 +40,10 @@ build_autoconf $AUTOCONF_ROOT $AUTOCONF_HASH
autoconf --version

# Compile the latest Python releases.
# (In order to have a proper SSL module, Python is compiled
# against a recent openssl [see env vars above], which is linked
# statically. We delete openssl afterwards.)
build_openssl $OPENSSL_ROOT $OPENSSL_HASH
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPython won't build without it:

+ /opt/_internal/cpython-3.6.6/bin/python get-pip.py
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/pip/

mkdir -p /opt/python
build_cpythons $CPYTHON_VERSIONS

Expand Down
5 changes: 3 additions & 2 deletions manywheel/build_scripts/build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Helper utilities for build

PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python
OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source/
# Ditto the curl sources
CURL_DOWNLOAD_URL=http://curl.askapache.com/download

Expand Down Expand Up @@ -90,8 +91,8 @@ function build_cpythons {


function do_openssl_build {
./config -d '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)' > /dev/null
make install > /dev/null
./config no-ssl2 no-shared -fPIC --prefix=/usr/local/ssl > /dev/null
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPython builds fail if it's not no-shared --prefix=/usr/local/ssl

make install_sw > /dev/null # Only install the OpenSSL software components.
}


Expand Down