-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Reduce size of Docker containers #1667
Conversation
@@ -1,14 +1,30 @@ | |||
# The deploy Docker image build a self-contained Ray instance suitable | |||
# for end users. | |||
# The base-deps Docker image installs main libraries needed to run Ray |
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.
it looked like the old comment on this file had been copy-pasted from the deploy
container
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.
Good catch.
Thanks @jameslamb this looks good to me! I think we do use cc @jssmith in case you want to take a look. |
@robertnishihara ahhhhhh ok I get it now, I see Line 54 in f1e5789
that's a cool trick. Glad I decided to leave |
Yeah, it feels a bit messy in some ways... inside of Anyway, thanks for the help! |
Test PASSed. |
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.
These changes all look like sensible cleanup and enhancements me.
@@ -1,14 +1,30 @@ | |||
# The deploy Docker image build a self-contained Ray instance suitable | |||
# for end users. | |||
# The base-deps Docker image installs main libraries needed to run Ray |
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.
Good catch.
What do these changes do?
Hello,
Thank you for this excellent project!
I've been reading through this repo trying to familiarize myself with the project, and saw something I may be able to help with. In this PR, I propose a few changes to the Dockerfiles in this repo to reduce container size and build time.
This PR reduces the size of
base-deps
by about 70 MB.Proposals related to build time / size:
vim
from the dependenciesvim
in the container to mess with files are welcome to add it in their own spin-off dockerfiles, but I believe the project should make the published container used to run Ray as small as possibleProposals related to style and administration:
apt-get
) on one line makes thegit blame
more usable and the Dockerfile more human-readableTesting
I can confirm I was able to build the
deploy
andexamples
containers.To test, I built the
base-deps
container as follows and then changed thedeploy
container to look atray_new_deps
(which it found locally):I built
deploy
andexamples
usinginstall-docker.sh
at the repo root.Future PR
I also want to propose removing
git
from these containers (since it isn't used in the build process, AFAICT), but didn't want to put that in this PR since it would involve changing some of the example documentation. If you are open to that change, I will make it in a follow-up PR.Thank you for your consideration,
-James
Related issue number
This does not relate to any open issues.