Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VL] Fix vcpkg binary caching in docker image #7331

Merged
merged 2 commits into from
Sep 24, 2024
Merged
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
3 changes: 1 addition & 2 deletions .github/workflows/build_bundle_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ jobs:
cd $GITHUB_WORKSPACE/ep/build-velox/src && \
./get_velox.sh && \
source /opt/rh/devtoolset-9/enable && \
source /opt/gluten//dev/vcpkg/env.sh && \
cd $GITHUB_WORKSPACE/ && \
export NUM_THREADS=4
./dev/builddeps-veloxbe.sh --build_tests=OFF --build_benchmarks=OFF --enable_s3=OFF \
./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_tests=OFF --build_benchmarks=OFF --enable_s3=OFF \
--enable_gcs=OFF --enable_hdfs=ON --enable_abfs=OFF
- name: Upload native libs
uses: actions/upload-artifact@v2
Expand Down
20 changes: 5 additions & 15 deletions dev/vcpkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,12 @@ For unsupported linux distro, you can install the following packages from packag
* openjdk 8
* maven

### Build and setup thirdparty depends
### Build gluten + velox with vcpkg installed dependencies

Simply run:
With `--enable_vcpkg=ON`, the below script will install all static libraries into `./vcpkg_installed/`. And it will
also set `$PATH` and `$CMAKE_TOOLCHAIN_FILE` to make CMake to locate the binary tools and libraries.
You can configure [binary cache](https://learn.microsoft.com/en-us/vcpkg/users/binarycaching) to accelerate the build.

``` sh
source $GLUTEN_REPO/dev/vcpkg/env.sh
```

This script will install all static libraries into the `./vcpkg_installed/`
directory and set the `$PATH` and `$CMAKE_TOOLCHAIN_FILE`.
This make build systems to locate the binary tools and libraries.
It will take about 15~30 minutes to download and build all dependencies from source.
You can configure [binary cache](https://learn.microsoft.com/en-us/vcpkg/users/binarycaching) to accelerate the next setup.

### Build gluten + velox

``` sh
$GLUTEN_REPO/dev/buildbundle-veloxbe.sh --build_tests=ON --build_benchmarks=ON --enable_s3=ON --enable_hdfs=ON
$GLUTEN_REPO/dev/buildbundle-veloxbe.sh --enable_vcpkg=ON --build_tests=ON --build_benchmarks=ON --enable_s3=ON --enable_hdfs=ON
```
6 changes: 4 additions & 2 deletions dev/vcpkg/docker/Dockerfile.gha
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ RUN mkdir -p /var/cache/vcpkg
ENV VCPKG_BINARY_SOURCES=clear;files,/var/cache/vcpkg,readwrite

# Build arrow, then install the native libs to system paths and jar package to .m2/ directory.
RUN cd /opt/gluten && source /opt/rh/devtoolset-9/enable && source ./dev/vcpkg/env.sh && \
bash ./dev/builddeps-veloxbe.sh build_arrow && rm -rf /opt/gluten
RUN cd /opt/gluten && source /opt/rh/devtoolset-9/enable && \
bash ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_tests=ON --enable_s3=ON --enable_gcs=ON \
--enable_hdfs=ON --enable_abfs=ON build_arrow && \
rm -rf /opt/gluten
Loading