slideflow icon indicating copy to clipboard operation
slideflow copied to clipboard

Reduce size of Docker image

Open sebp opened this issue 2 years ago • 2 comments

Using multi-stage build avoids that development and intermediate files increase the image's size. Multi-stage build allows just copying the compiled files to the final image without the intermediate layers.

Reduces the image's size from 8.99GB to 7.47GB.

Note: I haven't extensively tested whether the new image breaks something yet.

If there's a need, I can update the pytorch Dockerfile too.

sebp avatar May 17 '23 13:05 sebp

Thanks for the PR - this seems like a good idea. I'll run some tests to ensure nothing breaks, and if all is good, we should do this for the PyTorch dockerfile too.

jamesdolezal avatar May 17 '23 13:05 jamesdolezal

Just a quick update - I did have some issues with this multi-stage approach during initial testing, which is why I haven't been able to merge quite yet. I'll keep working on it and provide an update once I have a solution.

jamesdolezal avatar Oct 31 '23 19:10 jamesdolezal