<p>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.</p>

Nikola Borisov
<blockquote>
<p>Is it possible not to have separate copies of the filesystem of the<br />
container.</p>
</blockquote>
<p>Yes, you can do that.</p>
<p>You can have the <code>ReadOnlyMany</code> file system or <code>ReadWriteMany</code> file system.</p>
<p><strong>Hostpath</strong></p>
<p>You can also leverage the <strong><a href="https://kubernetes.io/docs/concepts/storage/volumes/#hostpath" rel="nofollow noreferrer">Hostpath</a></strong> to save the files over there and when POD is scheduled on that node it will use from there.</p>
<p>Make sure if your node goes down you might lose the saved file on that node, instead using above solution would be good.</p>
<p><strong>EFS or NFS</strong></p>
<p>If you are on GCP or AWS you can use the existing FS solution to mount the existing file system to multiple POD.</p>
<p>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.</p>
<p><a href="https://stackoverflow.com/a/68586922/5525824">GCP Filestore</a></p>
