Hi! Is there any good solution to manage hardware ...
# general
e
Hi! Is there any good solution to manage hardware toolkit with Pants? Our projects use Tensorflow and Pytorch to handle deep learning models, and for this, CUDA is a necessary toolkit. Tensorflow and Pytorch are really sensitive with CUDA version, so there is a need to match the compatibilities. How can handle this issue?
h
cc @flat-zoo-31952, I think this is related to https://github.com/pantsbuild/pants/issues/19552 ?
f
Possibly, yeah. It depends on how you're installing TF and PyTorch though. I'm not sure what installing TF looks like these days but I know at least PyTorch you can pip install and control CUDA compatibility by using a different wheel index
I don't think Pants natively supports using particular indexes for particular sets of packages (I don't think pip itself supports this except through multiple separate invocations of
pip install
with diferent parameters). So maybe this would be a good candidate here?
I have a few questions: • How do you install TF and PyTorch currently? Pip, conda, or other? Are you open to changing that? To what? • Do you need to work with multiple builds of these in a single repo? Like to have different CUDA versions? • Would you be comfortable using containers as the means to separate the differences between these different CUDA builds?
e
Hi, thank you for your reply. And sorry about late answers, I’m in vacation :) This is my answers: • How do you install TF and PyTorch currently? Pip, conda, or other? Are you open to changing that? To what? ◦ Currently, I use Pip to install necessary packages (include TF, Pytorch). Also, I use conda to separate environments to manage the packages by Python versions. It seems to be little awkward to use conda with pip installer but we do. So yes, I’m really open to change the installation way. • Do you need to work with multiple builds of these in a single repo? Like to have different CUDA versions? ◦ Actually, multiple builds are even now on our repo. Our repo has several projects and each of them has different TF or PyTorch version. Also, we have plans to continuously update new projects with ML frameworks, so I need some solution to handle this issue with Pants. • Would you be comfortable using containers as the means to separate the differences between these different CUDA builds? ◦ We use Docker container to manage several CUDA environment (this is the way to serve our application until now. We’ve migrated our repo to Pants environment), so yes, that is comfortable to me.