Skip to content

Commit

Permalink
[MINOR][VL] clean up aws sdk install script (#4138)
Browse files Browse the repository at this point in the history
clean up on aws_sdk install script to use the help function from Velox

Signed-off-by: Yuan Zhou <[email protected]>
  • Loading branch information
zhouyuan authored Dec 22, 2023
1 parent 6735853 commit b6374dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cpp/velox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ endif()
if(ENABLE_S3)
add_definitions(-DENABLE_S3)
find_awssdk()
find_package(ZLIB)
target_link_libraries(velox PUBLIC ${AWSSDK_LIBRARIES})
endif()

Expand All @@ -404,4 +405,4 @@ if(ENABLE_ABFS)
add_definitions(-DENABLE_ABFS)
find_azure()
target_link_libraries(velox PRIVATE Azure::azure-storage-blobs)
endif()
endif()
11 changes: 6 additions & 5 deletions ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ function process_setup_ubuntu {
sed -i '/^function install_fmt.*/i function install_protobuf {\n wget https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protobuf-all-21.4.tar.gz\n tar -xzf protobuf-all-21.4.tar.gz\n cd protobuf-21.4\n ./configure CXXFLAGS="-fPIC" --prefix=/usr/local\n make "-j$(nproc)"\n sudo make install\n sudo ldconfig\n}\n' scripts/setup-ubuntu.sh
sed -i '/^ run_and_time install_fmt/a \ \ run_and_time install_protobuf' scripts/setup-ubuntu.sh
fi
sed -i "s/apt install -y/sudo apt install -y/" ${VELOX_HOME}/scripts/setup-adapters.sh
if [ $ENABLE_S3 == "ON" ]; then
sed -i '/^function install_fmt.*/i function install_awssdk {\n github_checkout aws/aws-sdk-cpp 1.11.169 --depth 1 --recurse-submodules\n cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management" \n} \n' scripts/setup-ubuntu.sh
sed -i '/^ run_and_time install_fmt/a \ \ run_and_time install_awssdk' scripts/setup-ubuntu.sh
sed -i '/^ run_and_time install_fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh aws' scripts/setup-ubuntu.sh
fi
if [ $ENABLE_GCS == "ON" ]; then
sed -i '/^ run_and_time install_fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh gcs' scripts/setup-ubuntu.sh
Expand Down Expand Up @@ -146,9 +146,9 @@ function process_setup_centos8 {
sed -i '/^function cmake_install_deps.*/i function install_protobuf {\n wget https://github.com/protocolbuffers/protobuf/releases/download/v21.4/protobuf-all-21.4.tar.gz\n tar -xzf protobuf-all-21.4.tar.gz\n cd protobuf-21.4\n ./configure CXXFLAGS="-fPIC" --prefix=/usr/local\n make "-j$(nproc)"\n sudo make install\n sudo ldconfig\n}\n' scripts/setup-centos8.sh
sed -i '/^cmake_install_deps fmt/a \\install_protobuf' scripts/setup-centos8.sh
fi
sed -i "s/yum -y install/sudo yum -y install/" ${VELOX_HOME}/scripts/setup-adapters.sh
if [ $ENABLE_S3 == "ON" ]; then
sed -i '/^function cmake_install_deps.*/i function install_awssdk {\n github_checkout aws/aws-sdk-cpp 1.11.169 --depth 1 --recurse-submodules\n cmake_install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DMINIMIZE_SIZE:BOOL=ON -DENABLE_TESTING:BOOL=OFF -DBUILD_ONLY:STRING="s3;identity-management" \n} \n' scripts/setup-centos8.sh
sed -i '/^cmake_install_deps fmt/a \ \ install_awssdk' scripts/setup-centos8.sh
sed -i '/^cmake_install_deps fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh aws' scripts/setup-centos8.sh
fi
if [ $ENABLE_GCS == "ON" ]; then
sed -i '/^cmake_install_deps fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh gcs' scripts/setup-centos8.sh
Expand Down Expand Up @@ -183,8 +183,9 @@ function process_setup_centos7 {
if [[ $BUILD_PROTOBUF == "ON" ]] || [[ $ENABLE_HDFS == "ON" ]]; then
sed -i '/^ run_and_time install_fmt/a \ \ run_and_time install_protobuf' scripts/setup-centos7.sh
fi
sed -i "s/yum -y install/sudo yum -y install/" ${VELOX_HOME}/scripts/setup-adapters.sh
if [ $ENABLE_S3 == "ON" ]; then
sed -i '/^ run_and_time install_fmt/a \ \ run_and_time install_awssdk' scripts/setup-centos7.sh
sed -i '/^ run_and_time install_fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh aws' scripts/setup-centos7.sh
fi
if [ $ENABLE_GCS == "ON" ]; then
sed -i '/^ run_and_time install_fmt/a \ \ '${VELOX_HOME}/scripts'/setup-adapters.sh gcs' scripts/setup-centos7.sh
Expand Down

0 comments on commit b6374dd

Please sign in to comment.