librephotos-docker icon indicating copy to clipboard operation
librephotos-docker copied to clipboard

Use multi stage docker build

Open sushshring opened this issue 3 years ago • 2 comments

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.

sushshring avatar Jun 10 '21 00:06 sushshring

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.

derneuere avatar Jun 10 '21 12:06 derneuere

Created PR #17

sushshring avatar Jun 20 '21 18:06 sushshring