From 66ee6a43d226a15260f05c4597b01ee0755d6529 Mon Sep 17 00:00:00 2001 From: Deepak Majeti Date: Thu, 12 Dec 2024 13:02:59 -0500 Subject: [PATCH] [native] Update dependency dockerfile --- .../scripts/dockerfiles/centos-dependency.dockerfile | 6 +----- .../dockerfiles/ubuntu-22.04-dependency.dockerfile | 8 ++------ .../scripts/install_minimal_dependencies.sh | 10 ++++++++++ 3 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 presto-native-execution/scripts/install_minimal_dependencies.sh diff --git a/presto-native-execution/scripts/dockerfiles/centos-dependency.dockerfile b/presto-native-execution/scripts/dockerfiles/centos-dependency.dockerfile index ca93f48030e1..3340c8804871 100644 --- a/presto-native-execution/scripts/dockerfiles/centos-dependency.dockerfile +++ b/presto-native-execution/scripts/dockerfiles/centos-dependency.dockerfile @@ -19,8 +19,4 @@ ENV CXX=/opt/rh/gcc-toolset-12/root/bin/g++ RUN mkdir -p /scripts /velox/scripts COPY scripts /scripts COPY velox/scripts /velox/scripts -RUN mkdir build && \ - (cd build && ../scripts/setup-centos.sh && \ - ../velox/scripts/setup-adapters.sh && \ - ../scripts/setup-adapters.sh ) && \ - rm -rf build +RUN chmod +x /scripts/install_minimal_dependencies.sh && /scripts/install_minimal_dependencies.sh centos diff --git a/presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile b/presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile index e31cc72739ae..e05da266fb62 100644 --- a/presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile +++ b/presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile @@ -27,9 +27,5 @@ RUN mkdir -p /scripts /velox/scripts COPY scripts /scripts COPY velox/scripts /velox/scripts # setup-adapters.sh does not install rpm needed for minio install. -RUN mkdir build && \ - (cd build && ../scripts/setup-ubuntu.sh && \ - apt install -y rpm && \ - ../velox/scripts/setup-adapters.sh && \ - ../scripts/setup-adapters.sh ) && \ - rm -rf build +RUN apt install -y rpm +RUN chmod +x /scripts/install_minimal_dependencies.sh && /scripts/install_minimal_dependencies.sh ubuntu diff --git a/presto-native-execution/scripts/install_minimal_dependencies.sh b/presto-native-execution/scripts/install_minimal_dependencies.sh new file mode 100644 index 000000000000..a00f8afa11d3 --- /dev/null +++ b/presto-native-execution/scripts/install_minimal_dependencies.sh @@ -0,0 +1,10 @@ +../scripts/setup-$1.sh +../velox/scripts/setup-adapters.sh +../scripts/setup-adapters.sh +rm -rf build +rm -rf /usr/local/hadoop +rm -rf /usr/local/bin/fizz* +rm -rf /usr/local/bin/minio-2022-05-26 +rm -rf /usr/local/bin/proxygen* +rm -rf /usr/local/bin/grpc* +rm -rf /usr/local/bin/hq