R
RunPod•2mo ago
bert

How to Keep Installed Python Modules Persistent and How to Mount Multiple Volumes?

I'm running into a couple of issues on Runpod and would appreciate some help: Whenever I pause and restart my pod, all of my installed Python modules are lost. How can I make sure the Python modules I install remain persistent even after restarting? I know that this issue with persistence could probably be solved by mounting multiple volumes, but I can't find any method to mount multiple volumes in Runpod. Could you guide me on how to do this? Thanks for your assistance!
4 Replies
Encyrption
Encyrption•2mo ago
Mounting multiple volumes is not an allowed. As for keeping Python modules persistent your best option would be to bake them into the image you are using. You might be able to do that with symbolic links into your network volume, but those would also have to be rebuilt each time you run your pod.
bert
bertOP•2mo ago
Thank for you answerđź‘Ť I have some experience with Docker, but I know very little about how to bake a Docker image with GPU support. I also understand that some modules are optimized for specific GPUs. Is it necessary to create a similar environment with a GPU, or does it not matter? Can I even bake an image without GPU support, and later run it on a machine with a GPU without any issues? Thanks
Encyrption
Encyrption•2mo ago
Yeah, in most cases you don't need a GPU to build your Docker image. It can be beneficial to test locally but not a requirement.
nerdylive
nerdylive•2mo ago
or just use an venv in a network storge if you want
Want results from more Discord servers?
Add your server