swciitg / IntranetSearch

Apache License 2.0
2 stars 12 forks source link

Improve package size in docker container #10

Closed dhaneshragu closed 1 year ago

dhaneshragu commented 1 year ago

The current docker container in python folder uses lots of space due to sentence-transformers library. Optimise this space if possible by making changes in Dockerfile.

AtriChatterjee1 commented 1 year ago

Hey @dhaneshragu we can, definitely improve the size of the container by using slim image of the python3.9 being used in the file. If this is what you are looking for I can def link a PR

dhaneshragu commented 1 year ago

Sure, go ahead and attach a acreenshot of the size of the container that you manage to obtain after doing this. Also, the codebase should work properly with your changed Dockerfile. Note : I'll merge the PR only if significant reduction in size of container is achieved.

AtriChatterjee1 commented 1 year ago

using the slim tag, reduces the size by ~870MB, I am trying, if there are anyother ways to reduce the size further

(none is the previous image of intranet search) image

dhaneshragu commented 1 year ago

using the slim tag, reduces the size by ~870MB, I am trying, if there are anyother ways to reduce the size further

(none is the previous image of intranet search) image

Try to achieve more significant reduction. (as 870MB is less in comparison with 5.8GB size)

dhaneshragu commented 1 year ago

@AtriChatterjee1 , any improvements?

AtriChatterjee1 commented 1 year ago

Tried multistage builds, but that too didn't reduce the container size that significantly

dhaneshragu commented 1 year ago

Ah okay, try some other method or try to link a PR with the Dockerfile where you have achieved the greatest reduction. The code base must run properly within the container.