Hey! TLDR, I am having a hard time getting Flox to reconcile a few dependencies and have been going back and forth on it enough that I am wondering if I’m “missing the point” of the whole Flox / Nix ecosystem.
I started using flox maybe 4 or 5 months ago now, and it’s been pretty useful. However, for context, I’m quite “new”–I’ve been programming for <3 years, have really only started shipping stuff to a production environment in the last year, and have only done so as a solo dev without supervision in the last 6 months. Suffice it to say, I’ve never touched nix directly before and don’t really understand how it works.
I’m using a poetry environment nested inside of flox, and it’s been working quite well. It came time to add some gpu acceleration to my project via pytorch, and I had to get cuda working. After much pain, I can use nvcc to compile a cu script in flox. And, pytorch works on my machine in a poetry environment outside of flox. However, it’s not working in flox.
In the flox env, I dropped down to pycuda from torch and I found that for some reason flox was pointing to cuda 32 bit. When I forced it to point to cuda 64 bit, this issue I kept having with GCC and Glib popped back up, where it seems flox keeps trying to point to some version of glibc that is not actually compatible with cuda & my machine.
My instinct would be to try and pin glib to a version that works for me (2.35), but a) I don’t know how to do this as glibc does not have specific numbered versions in flox and b) it seems like it would be a bandaid over some underlying issue.
So, I guess I feel like I have to be missing something big here, and maybe it’s obvious–am I supposed to be installing cuda & nvidia drivers in flox, too? If so, do I then define a specific version for every machine I use?
It seems like either that is the case, or I need to understand flox better and perhaps edit whatever in flox is the equivalent of the nix shell?
I don’t know, I’m kind of lost, any direction would be helpful.
poetry run python -c "import pycuda.driver as cuda; cuda.init(); print(cuda.Device.count())"
/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash)
/nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/4bj2kxdm1462fzcc2i2s4dn33g2angcc-bash-5.2p32/bin/bash)