I have a problem with deploying PyTorch model usin...
# general
f
I have a problem with deploying PyTorch model using pants + pex + docker. Can anybody please help me on this? Or are there any best practices? I encountered three problems 1. Generated pex image doesn't recognize nvidia libraries -> solved by using
execution_mode="venv", venv_site_packages_copies = True
2. My develop environment (Macbook actually) doesn't have a nvidia gpu, so cpu PyTorch is selected but I want to create a gpu image. -> hoping will be solved if I run pants on the gpu server. 3. Resulting image doesn't utilize gpu -> seems like copying pex is not enough. I'm now trying official PyTorch image and hoping it solves problem... And for 1, I wonder why those flags fix the problem. And for 2, I want to know is there a way to build gpu pytorch docker optionally from Mac. It would be really convenient. And for 3, I want to know the most desirable image selection...or image installation
p
pytorch has been a huge pain, we ended up building docker containers with pants without using pex and just doing ugly things in the Dockerfile (installing from a requirements.txt). I would be interested in a cleaner solution too, but everything about pytorch was kind of horrible and pants made it worse.
😭 1