-
Notifications
You must be signed in to change notification settings - Fork 616
Add strip to cog builds #1902
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
Add strip to cog builds #1902
Conversation
* Strip out all unnecessary debug symbols shipped by prebuilt shared objects. * Careful not to touch the cpython binaries they don’t like strip, but they can be handled separately with flags. * This speeds up load times of the shared objects, especially when it comes to PyTorch.
|
Yeh great idea I'll do it there |
* Do this so the entire operation happens in one layer of docker. * Include —-no-cache-dir as a way of preventing non-running related code from entering the docker
Signed-off-by: Will Sackfield <sackfield@replicate.com>
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.
this looks reasonable, but it would be best to do this as a separate release from other optimizations so it can be rolled back if anything breaks.
it might also be nice to have a way to disable this, since it naturally makes segfaults a lot harder to debug
I do agree however a problem we face is that we need to build the base images as one shot, so some stuff needs to be done at the same time, and some stuff can be punted on. In terms of what we need to rebuild the base images: We can wait on: I can add a flag to disable the |
* Allow users to specify whether they want to strip the shared objects for a faster runtime.
Signed-off-by: Will Sackfield <sackfield@replicate.com>
separately with flags.