-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-45096][INFRA] Optimize apt-get install in Dockerfile #42842
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
Conversation
|
LGTM, but I think you should know (or maybe already know):
This best practices is for to help reduce redundat layer between Move frequently modified dependencies to front means: once the Dockerfile head front dependencies are modified, the following content will also be rebuild (due to infra cache invalidated). Finally, it impacts PRs which TL;DR: move stable dependencies to top, keep frequently modified dependencies to end. |
|
|
||
| RUN Rscript -e "install.packages(c('knitr', 'markdown', 'rmarkdown', 'testthat', 'devtools', 'e1071', 'survival', 'arrow', 'roxygen2', 'xml2'), repos='https://cloud.r-project.org/')" | ||
|
|
||
| # See more in SPARK-39959, roxygen2 < 7.2.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So L58 not change is intentional, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, should be also moved in L27, let me update
thanks for the detailed explaination, since we rarely modify the apt-install (we frequently changes the pip-install), so I think it would be fine. |
|
thanks @Yikun and @HyukjinKwon , merged to master |
What changes were proposed in this pull request?
follow the Best practices for writing Dockerfiles :
Why are the changes needed?
1, to address #42253 (comment)
2, when I attempted to change the apt-get install in #41918, the behavior was confusing. By following the best practices, further changes should work immediately.
Does this PR introduce any user-facing change?
NO, dev-only
How was this patch tested?
CI
Was this patch authored or co-authored using generative AI tooling?
NO