I would like to ask, if anyone knows how to install pytorch with cuda support through CondaPkg. It has to happen that I need to call some language models and I have opted to use transformers from HuggingFace, as sad as it can be. But I have spent quite few days figuring out, how to install pytorch with cuda support, because if I do just ] conda add pytorch, it CondaPkg will install torch without CUDA support. I have ended manually editing .CondaPkg/pixi.toml, add line
There’s nothing in CondaPkg for this directly, no.
Looks like those settings are implemented as conda virtual packages. I wonder if you can add a virtual package in the same way, try CondaPkg.add("__cuda", version="12.4")?
If that doesn’t work, we could easily enough add settings to CondaPkg for CUDA versions etc.
I have succeeded and it was such a hack that I have even written short memo, how to do it. My goal was to run vllm though pythoncall, but then I abandoned this and used vllm as a server. Nevertheless I have dug the notes and they were like this.
I think the whole trick was somehow install PythonCall (with its related CondaPkg), and not install anything through the CondaPkd (in other words exit julia).
Before installing anything, pixi requires to have following line
in file .CondaPkg/pixi.toml
[system-requirements]
cuda = "12.4"
which somehow tells the pixi to install conda
Then I have installed the packages I wanted by manually running pixi from command line as
That was the path I was following initially as well, but in the meantime I found that installing PyTorch as a Pip package with a forced wheel (instead of a Conda package) works. For example: