| 17 Feb 2022 |
K900 | And check if the file is there in your container | 07:40:47 |
worldofgeese | Image config is here from line 23 | 07:41:43 |
worldofgeese | 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 | That is weird | 07:47:10 |
K900 | What is PYTHONPATH set to in lbob? | 07:47:15 |
worldofgeese | I haven't set it explicitly, should I use this StackOverflow answer to find out? | 07:49:07 |
worldofgeese | And inside or outside the container? | 07:49:23 |
K900 | Inside the container, just run cat $(which lbob) | 07:50:36 |
worldofgeese | 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 | And now cat /nix/store/3jiz0vgryj2si4bglz14wwak4xna80vy-python3.9-little-bits-of-buddha-0.1.0/bin/.lbob-wrapped | 07:52:26 |
worldofgeese | 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 | That's weird | 07:53:45 |
K900 | It's definitely there | 07:53:47 |
worldofgeese | Should I file this as a bug? | 07:55:12 |
K900 | I'm not sure where you would file this, honestly | 07:56:15 |
K900 | Because it's probably not a poetry2nix bug | 07:56:21 |
K900 | It might be an importlib bug | 07:56:26 |
worldofgeese | 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 | It is | 07:57:43 |
worldofgeese | So maybe it's a dockerTools bug? | 07:57:47 |
K900 | It might be | 07:57:54 |
worldofgeese | 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 Llopis | Redacted or Malformed Event | 12:47:43 |
Jairo Llopis | hello people. I'm trying to get a proper devShell. So far I have followed the example from https://github.com/nix-community/poetry2nix#example-shellnix | 12:48:56 |
Jairo Llopis | It's working, but... poetry is not inside the shell. How to add it? | 12:49:14 |
Jairo 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 Llopis | See? I expected poetry to be available from the nix store instead... how to do that? | 12:51:02 |
Jairo 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 |
| teraku joined the room. | 15:27:49 |
teraku | 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 |