!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

303 Members
https://github.com/nix-community/poetry2nix54 Servers

Load older messages


SenderMessageTime
6 Nov 2023
@pareto-optimal-dev:matrix.orgpareto-optimal-devThanks for the clarification19:01:29
@pareto-optimal-dev:matrix.orgpareto-optimal-devSo they are just adding checks for each of the ibis backends19:01:42
@pareto-optimal-dev:matrix.orgpareto-optimal-devOh... I think this could be it, I'll have to try it when my build of your flake finishes. Adding python path to the resulting wrapper: https://sourcegraph.com/github.com/GTrunSec/dataflow2nix/-/blob/nix/prefect/packages/prefect.nix?L3919:01:57
@pareto-optimal-dev:matrix.orgpareto-optimal-dev Interesting. nix run github:MatthewCroughan/privateGPT puts me in a python shell. Cloning the repo and doing nix run .# gives error: unable to execute '/nix/store/0c71l30nmfcmks194m1a16vryi3pjr34-python3.11-private-gpt-0.1.0/bin/private-gpt': No such file or directory. 19:15:38
@matthewcroughan:defenestrate.itmatthewcroughanthat is odd 19:16:02
@matthewcroughan:defenestrate.itmatthewcroughan do --refresh on the nix run 19:16:52
@pareto-optimal-dev:matrix.orgpareto-optimal-devI get the error with both now19:17:24
@matthewcroughan:defenestrate.itmatthewcroughanI force pushed a change, you must have ran the cmd before that change 19:19:39
@matthewcroughan:defenestrate.itmatthewcroughanpreviously I used mkPoetryEnv and now I'm using mkPoetryApplication19:19:48
@matthewcroughan:defenestrate.itmatthewcroughan
In reply to @pareto-optimal-dev:matrix.org
Oh... I think this could be it, I'll have to try it when my build of your flake finishes. Adding python path to the resulting wrapper: https://sourcegraph.com/github.com/GTrunSec/dataflow2nix/-/blob/nix/prefect/packages/prefect.nix?L39
Yeah but why isn't mkPoetryApplication doing this
19:32:32
@matthewcroughan:defenestrate.itmatthewcroughaneven the mkPoetryEnv doesn't include tiktoken19:35:19
@matthewcroughan:defenestrate.itmatthewcroughan
ls result/lib/python3.11/site-packages/tiktoken-0.5.1.dist-info
license_files  METADATA  RECORD  WHEEL
19:35:50
@matthewcroughan:defenestrate.itmatthewcroughanit only has this in it 19:35:52
@matthewcroughan:defenestrate.itmatthewcroughanah the install of tiktoken may not work..19:36:09
@matthewcroughan:defenestrate.itmatthewcroughanIt definitely compiled, but maybe outPath has wrong stuff in it 19:36:32
@matthewcroughan:defenestrate.itmatthewcroughan
python3.11-tiktoken> installPhase ()
python3.11-tiktoken> {
python3.11-tiktoken>     runHook preInstall;
python3.11-tiktoken>     if [[ -z "${makeFlags-}" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then
python3.11-tiktoken>         echo "no Makefile or custom installPhase, doing nothing";
python3.11-tiktoken>         runHook postInstall;
python3.11-tiktoken>         return;
python3.11-tiktoken>     else
python3.11-tiktoken>         foundMakefile=1;
python3.11-tiktoken>     fi;
python3.11-tiktoken>     if [ -n "$prefix" ]; then
python3.11-tiktoken>         mkdir -p "$prefix";
python3.11-tiktoken>     fi;
python3.11-tiktoken>     local flagsArray=(${enableParallelInstalling:+-j${NIX_BUILD_CORES}} SHELL=$SHELL);
python3.11-tiktoken>     _accumFlagsArray makeFlags makeFlagsArray installFlags installFlagsArray;
python3.11-tiktoken>     if [ -n "$__structuredAttrs" ]; then
python3.11-tiktoken>         flagsArray+=("${installTargets[@]:-install}");
python3.11-tiktoken>     else
python3.11-tiktoken>         flagsArray+=(${installTargets:-install});
python3.11-tiktoken>     fi;
python3.11-tiktoken>     echoCmd 'install flags' "${flagsArray[@]}";
python3.11-tiktoken>     make ${makefile:+-f $makefile} "${flagsArray[@]}";
python3.11-tiktoken>     unset flagsArray;
python3.11-tiktoken>     runHook postInstall
python3.11-tiktoken> }
19:37:35
@matthewcroughan:defenestrate.itmatthewcroughanthis is the installPhase for it 19:37:38
@matthewcroughan:defenestrate.itmatthewcroughan

also

python3.11-tiktoken> ⚠  Warning: `build-backend` in pyproject.toml is not set to `maturin`, packaging tools such as pip will not use maturin to build this project.
19:38:02
@matthewcroughan:defenestrate.itmatthewcroughanI included the maturin hook when it was not necessary 19:39:41
@matthewcroughan:defenestrate.itmatthewcroughanthis lead to the failure, only included dist-info in the site-packages 19:40:04
@matthewcroughan:defenestrate.itmatthewcroughan
                        pkgs.rustPlatform.cargoSetupHook
                        pkgs.rustc
                        pkgs.cargo

19:40:09
@matthewcroughan:defenestrate.itmatthewcroughan instead, if I remove pkgs.rustPlatform.maturinBuildHook and just add rustc and cargo, it works 19:40:24
@matthewcroughan:defenestrate.itmatthewcroughanAh good19:41:30
@matthewcroughan:defenestrate.itmatthewcroughan
 python -m private_gpt
19:41:21.103 [INFO    ] private_gpt.settings.settings_loader - Starting application with profiles=['default']
2023-11-06 19:41:21.194091237 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:1987 CreateInferencePybindStateModule] Init provider bridge failed.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/matthew/git/privateGPT/private_gpt/__main__.py", line 5, in <module>
    from private_gpt.main import app
  File "/home/matthew/git/privateGPT/private_gpt/main.py", line 106, in <module>
    from private_gpt.ui.ui import mount_in_app
  File "/home/matthew/git/privateGPT/private_gpt/ui/ui.py", line 7, in <module>
    import gradio as gr  # type: ignore
    ^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'gradio
19:41:34
@matthewcroughan:defenestrate.itmatthewcroughannow we enter the undeclared dependencies phase 19:41:41
@matthewcroughan:defenestrate.itmatthewcroughanHow are you supposed to add new dependencies to self?19:58:18
@matthewcroughan:defenestrate.itmatthewcroughanThis is a situation I've ran into at least 3 times, and I always forget how I solve it 20:01:05
@matthewcroughan:defenestrate.itmatthewcroughan
...
        packages = {
          default = mkPoetryApplication {
            projectDir = self;
            propagatedBuildInputs = [
              pkgs.python3Packages.gradio
            ];
            overrides = defaultPoetryOverrides.extend
              (self: super: {
                chroma-hnswlib = super.chroma-hnswlib.override { preferWheel = true; };
                chromadb = super.chromadb.override { preferWheel = true; };
                pypika = super.pypika.overridePythonAttrs
                  (

...
20:01:15
@matthewcroughan:defenestrate.itmatthewcroughanyou see how line 5 to 7 is never going to work20:01:23
@matthewcroughan:defenestrate.itmatthewcroughanwhat I want access to is the overrides of self 20:01:32

Show newer messages


Back to Room ListRoom Version: 6