-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: ensure apt *and* python c extensions work properly #1222
base: main
Are you sure you want to change the base?
Conversation
Yup, this is definitely the issue.
Agreed. That would cause issues in other ways.
Yeah, having a shell script bundled to do this wouldn't be terrible. However, there's got to be a better way. I don't know nix enough to understand what the canonical way to handle this, but I imagine this is something that other nix users have run into before. |
This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Friendly reminder about this pull request! Let me know if there's anything else needed here. |
Hi @iloveitaly, I'm a little worried about removing |
Yeah, I'm not really sure what the best solution here is. My limited knowledge of nixpkgs is working against me. Will fix the lining and see if that gets us closer. |
This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Friendly reminder on this pull request! Let me know if there are any updates or additional changes needed. |
Yes sorry @iloveitaly, haven't forgot about this. Just unsure of the best solution currently and haven't had that much time to explore solutions. |
Yeah, I'm unclear as well. Is there anyone tied to the project that has deeper nix experience that could weigh in? I imagine this problem has come up quite a bit in the past. |
Hmm could we dynamically set the LD_LIBRARY_PATH based on the providers? You'd almost need like, a hash map, and then each provider could either create an entry, or blank an entry, during a phase. And then you'd join it all into the LD_LIBRARY_PATH Or maybe have an install phase run as a "pre-phase" execution? Like in theory you'd solve this by doing all your apt stuff, modifying LD_LIBRARY_PATH, and then doing "pip install" right? |
We already do this with the But the problem in the failing code example provided is that both numpy and apt are used. |
I wonder if we could build a base image of debian where the glibc version matches the glibc version in Nix |
What are the use cases for requiring One option would be for us to install Python not using Nix at all (and with something like asdf) |
I like this idea of using mise or asdf to install python. It would be really interesting to use mise across all providers. I ran into this specifically when launching an interactive she'll and debugging a container issue locally. However, I ran into this issue on tools beyond apt which means that users could run into this when shelling out to a CLI binary. I like the map-based modification, although I don't have a strong idea of what impacts that would have on the rest of the system. I just don't have enough incentive right now to learn nix. |
Repost of this PR which was closed: #1103
I ran into a tricky problem:
apt
in this caseapt
(and, more importantly, I'm assuming many other system commands) with the following error:This error can be fixed by reverting the mutated
LD_LIBRARY_PATH
from:to:
Did some research:
I'm new to nix. It seems like creating a bespoke shell env with
LD
modified is the way to go, but that wouldn't actually solve this issue sinceLD_LIBRARY_PATH
would be inherited by the py process and therefore passed to the shell (unless the modifiedLD
only applies to package installation, but I'm confident that would work either.In any case, I'm curious what folks think here. I added a failing test to work off of, but unsure of the best solution.
Docker container success assertion
In investigating this, I found that the docker container execution is not asserted to be successful. This feels like a good change
to make for all containers to avoid swallowing otherwise important errors.