| 6 Nov 2023 |
matthewcroughan - nix.how | ah the install of tiktoken may not work.. | 19:36:09 |
matthewcroughan - nix.how | It definitely compiled, but maybe outPath has wrong stuff in it | 19:36:32 |
matthewcroughan - nix.how | 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 - nix.how | this is the installPhase for it | 19:37:38 |
matthewcroughan - nix.how | 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 - nix.how | I included the maturin hook when it was not necessary | 19:39:41 |
matthewcroughan - nix.how | this lead to the failure, only included dist-info in the site-packages | 19:40:04 |
matthewcroughan - nix.how | pkgs.rustPlatform.cargoSetupHook
pkgs.rustc
pkgs.cargo
| 19:40:09 |
matthewcroughan - nix.how | instead, if I remove pkgs.rustPlatform.maturinBuildHook and just add rustc and cargo, it works | 19:40:24 |
matthewcroughan - nix.how | Ah good | 19:41:30 |
matthewcroughan - nix.how | 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 - nix.how | now we enter the undeclared dependencies phase | 19:41:41 |
matthewcroughan - nix.how | How are you supposed to add new dependencies to self? | 19:58:18 |
matthewcroughan - nix.how | This is a situation I've ran into at least 3 times, and I always forget how I solve it | 20:01:05 |
matthewcroughan - nix.how | ...
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 - nix.how | you see how line 5 to 7 is never going to work | 20:01:23 |
matthewcroughan - nix.how | what I want access to is the overrides of self | 20:01:32 |
matthewcroughan - nix.how | yeah you can't do it, damnit | 20:08:03 |
matthewcroughan - nix.how | mkPoetryEnv has extraPackages | 20:12:57 |
matthewcroughan - nix.how |
| 20:13:06 |
matthewcroughan - nix.how | * default = mkPoetryEnv rec {
projectDir = self;
extraPackages = p: with p; [ gradio ];
| 20:13:10 |
matthewcroughan - nix.how | There seems to be no logs to suggest that preferWheels is doinga nything | 20:15:06 |
matthewcroughan - nix.how | * There seems to be no logs to suggest that preferWheels is doing anything | 20:15:09 |
matthewcroughan - nix.how | the only time I get any success with preferWheels is when I turn it on for the function call mkPoetryApplication or mkPoetryEnv | 20:15:31 |
matthewcroughan - nix.how | error: builder for '/nix/store/lgvs95z5g2fqm6flhybn295276mcz4f7-python3.11-watchfiles-0.21.0.drv' failed with exit code 1;
last 10 log lines:
> Using wheelUnpackPhase
> Sourcing pypa-install-hook
> Using pypaInstallPhase
> Sourcing python-imports-check-hook.sh
> Using pythonImportsCheckPhase
> Sourcing python-namespaces-hook
> Sourcing python-catch-conflicts-hook.sh
> unpacking sources
> Executing wheelUnpackPhase
> cp: -r not specified; omitting directory '/nix/store/q3zw45mf49af911hphcpb8ng348m3qfq-source'
For full logs, run 'nix log /nix/store/lgvs95z5g2fqm6flhybn295276mcz4f7-python3.11-watchfiles-0.21.0.drv'.
``
| 20:15:33 |
matthewcroughan - nix.how | then when I turn it on, I get issues with cp -r | 20:15:44 |
matthewcroughan - nix.how | * then when I turn it on, I get issues with cp | 20:15:48 |
matthewcroughan - nix.how | now this dependency on gradio has introduced 9 more broken dependencies to my chain :( | 20:17:21 |
matthewcroughan - nix.how | if I turn wheels on globally, I can't turn it off on a per package basis, .override { preferWheel = false; } seems to have no impact | 20:18:34 |
matthewcroughan - nix.how | specifically, cmake is giving me a lot of grief | 20:22:31 |