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

Use multi stage docker build #15

Open
sushshring opened this issue Jun 10, 2021 · 2 comments
Open

Use multi stage docker build #15

sushshring opened this issue Jun 10, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@sushshring
Copy link

Suggestion: Use multi stage docker build to only copy data model files instead of also including the whole tar file.
Multi stage build will also mean that only the dlib binaries are packaged; the dlib source and dlib object files won't be part of the build. Preliminary testing on my system shows an image reduction about ~1GB on the backend device. If any other deadweight from the build process can also be shed, it can make the image much leaner and easier to run on lower end devices.

I would submit a pull request but I'm not certain how the dlib binaries are installed/referred, so just a direct change to the dockerfile may cause regressions.

@derneuere
Copy link
Member

How about you open up a pull request with your current changes and push an image to docker hub. I would try to find some people who use CPUs that don't support AVX, to install and test it.

@sushshring
Copy link
Author

Created PR #17

@derneuere derneuere changed the title SUGGESTION: Use multi stage docker build Use multi stage docker build Sep 21, 2021
@derneuere derneuere added the enhancement New feature or request label Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants