Reputation: 368
I have a container with pytorch. The container is 3GB. When i run 20 instances of this container it takes 60GB of disk space. I basically have 20 copies of the same library. Is it possible not to have separate copies of the filesystem of the container. If the container fs is set to readonly would that help? Im running in k8s.
Upvotes: 1
Views: 219
Reputation: 30093
Is it possible not to have separate copies of the filesystem of the
container.
Yes, you can do that.
You can have the ReadOnlyMany
file system or ReadWriteMany
file system.
Hostpath
You can also leverage the Hostpath to save the files over there and when POD is scheduled on that node it will use from there.
Make sure if your node goes down you might lose the saved file on that node, instead using above solution would be good.
EFS or NFS
If you are on GCP or AWS you can use the existing FS solution to mount the existing file system to multiple POD.
You can also create your own NFS file system and save files into it, when POD gets scheduled it will start using files from NFS shared file system.
Upvotes: 1