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

[native] Update dependency dockerfile #24257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the 644 for the script on purpose? Why don't we give it execute (755) when it is added in the first place and don't need the chmod?

The name of the script - minimal_dependencies sounds like the minimum number of dependencies to build when in fact we install everything. Minimal refers to the size of the resulting image. Trying to think of a better name because this might cause confusion when looking only at the name.

Maybe something with install_and_reduce_size.sh or something similar?

Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions presto-native-execution/scripts/install_minimal_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
../scripts/setup-$1.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the license header in this new file.

../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
Loading