!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

308 Members
https://github.com/nix-community/poetry2nix55 Servers

Load older messages


SenderMessageTime
17 Feb 2022
@k900:0upti.meK900And check if the file is there in your container07:40:47
@worldofgeese:one.ems.hostworldofgeese Image config is here from line 23 07:41:43
@worldofgeese:one.ems.hostworldofgeese
bash-5.1# ls /nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3.9-little-bits-of-buddha-0.1.0/lib/python3.9/site-packages/little_bits_of_buddha/
__pycache__  app.py  data.json	data.py  run.py
07:44:38
@k900:0upti.meK900That is weird07:47:10
@k900:0upti.meK900 What is PYTHONPATH set to in lbob? 07:47:15
@worldofgeese:one.ems.hostworldofgeese I haven't set it explicitly, should I use this StackOverflow answer to find out? 07:49:07
@worldofgeese:one.ems.hostworldofgeeseAnd inside or outside the container?07:49:23
@k900:0upti.meK900 Inside the container, just run cat $(which lbob) 07:50:36
@worldofgeese:one.ems.hostworldofgeese
bash-5.1# cat $(which lbob)
#! /nix/store/2kh3c4v2vf6d6xg6c9n8zvfpwf3zzwca-bash-5.1-p12/bin/bash -e
export PATH='/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/bin:/nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin:/nix/store/wmaqg26cza9vvck1wglp3xywsqabnp7n-python3.9-flask-2.0.2/bin'${PATH:+':'}$PATH
export PYTHONNOUSERSITE='true'
exec -a "$0" "/nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin/.lbob-wrapped"  "$@"
07:51:42
@k900:0upti.meK900 And now cat /nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin/.lbob-wrapped 07:52:26
@worldofgeese:one.ems.hostworldofgeese
bash-5.1# cat /nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin/.lbob-wrapped
#!/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/bin/python3.9
# -*- coding: utf-8 -*-
import sys;import site;import functools;sys.argv[0] = '/nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin/lbob';functools.reduce(lambda k, p: site.addsitedir(p, k), ['/nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/lib/python3.9/site-packages','/nix/store/wmaqg26cza9vvck1wglp3xywsqabnp7n-python3.9-flask-2.0.2/lib/python3.9/site-packages','/nix/store/fn3hgaz6sfr3cpvmzd1lxl10rivs96wc-python3.9-jinja2-3.0.3/lib/python3.9/site-packages','/nix/store/j68i2axxrgn0wcqxfw4lyqqw94v9r889-python3.9-markupsafe-2.0.1/lib/python3.9/site-packages','/nix/store/lvcvbrk3qm14r7qziblnkgcxmx4wj8rb-python3.9-werkzeug-2.0.3/lib/python3.9/site-packages','/nix/store/1fg49005dvz6nl8xmz677zl3vd4pn5li-python3.9-click-8.0.3/lib/python3.9/site-packages','/nix/store/m6zvprr8r0972c1kc0hjsz3ix6qx7jxd-python3.9-itsdangerous-2.0.1/lib/python3.9/site-packages','/nix/store/jsf2dfbia2n1gwyh4m0kjwq51smdyxsp-python3.9-setuptools-57.2.0/lib/python3.9/site-packages'], site._init_pathinfo());
import re
import sys
from little_bits_of_buddha.app import main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
07:53:26
@k900:0upti.meK900That's weird07:53:45
@k900:0upti.meK900It's definitely there07:53:47
@worldofgeese:one.ems.hostworldofgeeseShould I file this as a bug?07:55:12
@k900:0upti.meK900I'm not sure where you would file this, honestly07:56:15
@k900:0upti.meK900Because it's probably not a poetry2nix bug07:56:21
@k900:0upti.meK900 It might be an importlib bug 07:56:26
@worldofgeese:one.ems.hostworldofgeese Isn't it odd it works as both a Nix derivation and with poetry run lbob but not inside a container? 07:57:26
@k900:0upti.meK900It is07:57:43
@worldofgeese:one.ems.hostworldofgeese So maybe it's a dockerTools bug? 07:57:47
@k900:0upti.meK900It might be07:57:54
@worldofgeese:one.ems.hostworldofgeese I think my next step will be to build a container image with something like buildah or just writing a plain Dockerfile and test if it works that way. If it does, I'll file the issue as a dockerTools bug and let the packagers decide what it's a bug of 08:00:17
21 Feb 2022
@jairo:recallstack.icuJairo LlopisRedacted or Malformed Event12:47:43
@jairo:recallstack.icuJairo Llopishello people. I'm trying to get a proper devShell. So far I have followed the example from https://github.com/nix-community/poetry2nix#example-shellnix12:48:56
@jairo:recallstack.icuJairo LlopisIt's working, but... poetry is not inside the shell. How to add it?12:49:14
@jairo:recallstack.icuJairo Llopis
> nix develop -c which python
/nix/store/08aymzy89d1r2sviq2rn00ciip25wha4-python3-3.9.10-env/bin/python

> nix develop -c which poetry
/var/home/yajo/.local/bin/poetry
12:50:19
@jairo:recallstack.icuJairo LlopisSee? I expected poetry to be available from the nix store instead... how to do that?12:51:02
@jairo:recallstack.icuJairo Llopis

I tried adding poetry to extraPackages but didn't work:

      devShell = prev.poetry2nix.mkPoetryEnv {
        projectDir = ./.;
        editablePackageSources = {
          monix = ./monix;
        };
        extraPackages = ps: with ps; [
          poetry
        ];
      }.env;

It failed:

error: collision between `/nix/store/2bn57zh92ajirim070nkzqyp7ialwf3g-python3.9-poetry-core-1.0.7/lib/python3.9/site-packages/poetry/__init__.py' and `/nix/store/jv411g1gg5njclqnas9md97y0p55z06c-python3.9-poetry-1.1.12/lib/python3.9/site-packages/poetry/__init__.py'
12:52:11
@milchdealer:matrix.orgteraku joined the room.15:27:49
@milchdealer:matrix.orgteraku

Hello! I'm trying to use poetry2nix for a kubeflow project we have. This means it unfortunately runs with Py3.6 (soon 3.8 I heard). I got to a point where I was able to specify Python 3.6, but now I am getting a version mismatch arrow:
error: arrow-cpp version (7.0) mismatches pyarrow version (2.0)

I'm not entirely sure where it gets arrow-cpp 7.0 from, my pyarrow version specified in the poetry.lock is 2.0.

My default.nix:

{ pkgs ? import <nixpkgs> {} }:
let
python36 = import <darwin20.python36> { system = "x86_64-darwin"; };
myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
ml-policy-compliance = ./ml_policy_compliance;
};
};
in myAppEnv.env

15:36:05

Show newer messages


Back to Room ListRoom Version: 6