-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable AWSSDK on Linux by statically linking OpenSSL and cURL (#421)
Summary: This PR adds all supports to enable awssdk for linux releases - The linux release workflow starts to use `pytorch/manylinux-cpu` docker to align with compiler version with PyTorch Core - Add shell script to install OpenSSL and cURL on docker image (This step can be improved if TorchData wants to own a new docker image with these two libraries pre-built) - Update `torchdata/csrc/CMakeLists.txt` to respect the static OpenSSL and cURL - Correct `thrid_party/CMakeLists.txt` without adding redundant dependencies for `_torchdata` - Add `auditwheel show` to validate the binaries are `manylinux_2_17` (alias of `manylinux2014`) - Update Readme for release - Make our testing CI running with AWSSDK enabled by default to save more time/money to run CI tests - Remove redundant `numpy` dependency introduced by `tf_record`. And, fix tests in this file See the workflow for night release: https://github.com/pytorch/data/actions/runs/2391843245 See the `manylinux` version: https://github.com/pytorch/data/runs/6612861049?check_suite_focus=true#step:9:67 `manylinux_2_17_x86_64` is the alias of `manylinux_2014` Pull Request resolved: #421 Reviewed By: NivekT Differential Revision: D36641092 Pulled By: ejguan fbshipit-source-id: 349bfd896ee0db01eea849580984f4000ca2bc3f
- Loading branch information
1 parent
3d967c6
commit 7fde5a7
Showing
8 changed files
with
138 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
OPENSSL_URL="https://www.openssl.org/source/" | ||
OPENSSL_NAME="openssl-1.1.1o" | ||
OPENSSL_SHA256="9384a2b0570dd80358841464677115df785edb941c71211f75076d72fe6b438f" | ||
OPENSSL_BUILD_FLAGS="no-ssl2 no-zlib no-shared no-comp no-dynamic-engine enable-ec_nistp_64_gcc_128" | ||
|
||
CURL_URL="https://github.com/curl/curl/releases/download" | ||
CURL_NAME="curl-7.83.1" | ||
CURL_BUILD_FLAGS="--disable-shared" | ||
|
||
function check_sha256sum { | ||
local fname=$1 | ||
local sha256=$2 | ||
echo "${sha256} ${fname}" > ${fname}.sha256 | ||
sha256sum -c ${fname}.sha256 | ||
rm ${fname}.sha256 | ||
} | ||
|
||
yum erase -y openssl-devel curl-devel | ||
|
||
pushd ${WORKSPACE} | ||
|
||
# OpenSSL | ||
curl -fsSL -o ${OPENSSL_NAME}.tar.gz ${OPENSSL_URL}/${OPENSSL_NAME}.tar.gz | ||
check_sha256sum ${OPENSSL_NAME}.tar.gz ${OPENSSL_SHA256} | ||
tar zxf ${OPENSSL_NAME}.tar.gz | ||
|
||
pushd ${OPENSSL_NAME} | ||
|
||
./config $OPENSSL_BUILD_FLAGS --prefix=${WORKSPACE}/ssl --openssldir=${WORKSPACE}/ssl | ||
make -j4 > /dev/null | ||
# avoid installing the docs | ||
# https://github.com/openssl/openssl/issues/6685#issuecomment-403838728 | ||
make install_sw > /dev/null | ||
|
||
popd | ||
rm -rf ${OPENSSL_NAME} ${OPENSSL_NAME}.tar.gz | ||
|
||
# cURL | ||
curl -fsSL -o ${CURL_NAME}.tar.gz ${CURL_URL}/${CURL_NAME//./_}/${CURL_NAME}.tar.gz | ||
tar zxf ${CURL_NAME}.tar.gz | ||
|
||
pushd ${CURL_NAME} | ||
|
||
./configure ${CURL_BUILD_FLAGS} --with-openssl=${WORKSPACE}/ssl --prefix=${WORKSPACE}/curl | ||
make -j4 > /dev/null | ||
make install > /dev/null | ||
|
||
popd | ||
rm -rf ${CURL_NAME} ${CURL_NAME}.tar.gz | ||
|
||
popd |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters