!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

324 Members
https://github.com/nix-community/poetry2nix65 Servers

Load older messages


SenderMessageTime
23 Mar 2024
@leonardp:matrix.orgleonardpi've seen some issues on github that point to a similar problem i guess but i couldn't figure out how to work around this16:14:30
@leonardp:matrix.orgleonardpis there a workaround? am i doing something wrong? is the template broken? i am very confused16:16:33
@leonardp:matrix.orgleonardpokaay18:33:55
@leonardp:matrix.orgleonardpafter staring at it for a while i figured it out18:34:07
@leonardp:matrix.orgleonardpalso reading this issue more carefully helped: https://github.com/nix-community/poetry2nix/issues/147118:34:46
@leonardp:matrix.orgleonardp The template project passes the flake self to projectDir, which seems weird to me. 18:34:58
@leonardp:matrix.orgleonardp replacing self with ./. fixed the issue 18:35:25
@reckenrode:matrix.orgRandy EckenrodeRedacted or Malformed Event20:05:25
24 Mar 2024
@latenighticecream:matrix.orglatenighticecream Hey, I'm back with mitsuba problems. My devshell builds fine but when I try to import the module in python, I get this (actually very nice) warning:
WARNING:root:The `mitsuba` package relies on `drjit`
and needs it to be installed at a specific location. 
Currently, `drjit` is located at 
"/nix/store/d0a6r1bz06sd6p5y7cy7dkai9qi8n79w-python3.10-drjit-0.4.4/lib/python3.10/site-packages/drjit"
when it is expected to be at
"/nix/store/9i58bxc70ya01jgq1x1k7843jgv5mjvw-python3.10-mitsuba-3.5.0/lib/python3.10/site-packages/drjit".
This can happen when both packages are not installed in the same Python environment.
You will very likely experience linking issues if you do not fix this.
Which later produces the error:
ImportError: The 'mitsuba' native modules could not be imported.
You're likely trying to use Mitsuba within a Python binary
(/nix/store/0raqv2didf2vabgx1rq6s2qrl9jwp004-python3-3.10.13-env/bin/python3.10)
that is different from the one for which the native module was compiled (/opt/python/cp310-cp310/bin/python).
So drjit is supposed to be over at the mitsuba derivation but it of course has its own. Is there any way to fix this?
Maybe the second output is not even related to this problem?
This is my current override:
overrides = poetry2nix.overrides.withDefaults (final: prev: {

  mitsuba = prev.mitsuba.overridePythonAttrs (old: {
    nativeBuildInputs = (old.buildInputs or [ ]) ++ [ final.drjit ];
    buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libllvm ];
  });
...
10:21:42
@latenighticecream:matrix.orglatenighticecream Ok, so I managed to kick out the first warning by doing this ugly stuff (just for debugging):
postFixup = pkgs.lib.strings.concatStrings [
  (old.postFixup or "")
  "\n"
  "ln -s ${final.drjit}/lib/python3.10/site-packages/drjit $out/lib/python3.10/site-packages/drjit"
];
so it is unrelated to the ImportError I mentioned previously. But then how can I fix the ImportError?
11:56:21
@leonardp:matrix.orgleonardp latenighticecream: not sure if that helps. but can you build drjit as a seperate package and then use it as a "normal" buildinput for mitsuba? 12:29:21
@leonardp:matrix.orgleonardpdo you have a github repo to share? i might be able to also take a look at it today12:30:21
@leonardp:matrix.orgleonardpi am very much interested in using mitsuba myself :)12:30:32
@latenighticecream:matrix.orglatenighticecream Thanks, I will try that out !
I don't have a repo for this, but i will create a temporary one for this. Currently, this is for my masters thesis which is a private repo for the time I work on it. The stupid thing is, I don't really want to use any of mitsuba - I am just trying to get a shell with sionna which requires this package, but only for things that I dont even need xD
12:51:12
@cloudcomputer:matrix.orgcloudcomputer joined the room.13:18:41
@cloudcomputer:matrix.orgcloudcomputerI am trying to update poetry2nix to work with a more recent nixpkgs, and I need some help with the darwin builds. I don't have access to a mac.13:19:51
@cloudcomputer:matrix.orgcloudcomputerhttps://github.com/nix-community/poetry2nix/pull/1559 is the PR13:20:16
@cloudcomputer:matrix.orgcloudcomputerIt looks like there's some issues with function pointer signatures with lxml, scipy and matplotlib (or some transitive dependency thereof)13:21:20
@leonardp:matrix.orgleonardp latenighticecream: welcome to dependency hell 🫠
if you can provide a minimal example repo (i.e. flake with drjit+mitsuba packages) i'd be willing to help
but i only have time to work on such projects on weekends
13:37:14
@leonardp:matrix.orgleonardpi wanted to try out mitsuba for photogrammetry13:37:35
@cloudcomputer:matrix.orgcloudcomputerRelated to this, all the cloud providers I've tried to use, including Scaleway and MacStadium seem to prohibit me from doing anything without first undergoing an account review. I'm using masked email address via fastmail, and I'm guessing they flag that or something.13:43:44
@cloudcomputer:matrix.orgcloudcomputer * Related to this, all the cloud providers I've tried to use, including Scaleway and MacStadium seem to prohibit me from doing anything without first undergoing an account review. I'm using masked email addresses via fastmail, and I'm guessing they flag that or something. 13:44:02
@cloudcomputer:matrix.orgcloudcomputerScaleway in particular was horrendous. They locked my account after I spun up an instance and continued to charge me for the instance after locking my account.13:45:13
@latenighticecream:matrix.orglatenighticecream
In reply to@leonardp:matrix.org
latenighticecream: welcome to dependency hell 🫠
if you can provide a minimal example repo (i.e. flake with drjit+mitsuba packages) i'd be willing to help
but i only have time to work on such projects on weekends
here it is: https://github.com/LateNightIceCream/poetry2nix-mitsuba
13:51:41
@leonardp:matrix.orgleonardpcool i'll look into it13:57:07
@latenighticecream:matrix.orglatenighticecream
In reply to@leonardp:matrix.org
cool i'll look into it
thank you !!
13:58:37
@leonardp:matrix.orgleonardp latenighticecream: i think your problems go deeper 15:11:13
@leonardp:matrix.orgleonardp:/15:11:18
@leonardp:matrix.orgleonardpi do not think the dependencies are built correctly at all15:11:55
@leonardp:matrix.orgleonardp

id basically did:

nix develop
cd src
poetry add drjit
poetry remove mitsuba
15:12:37

Show newer messages


Back to Room ListRoom Version: 6