dalai icon indicating copy to clipboard operation
dalai copied to clipboard

Not possible to install on Ubuntu 22.04

Open smhanov opened this issue 1 year ago • 5 comments

I can't install it on Ubuntu 22.04.2 LTS:

smhanov@localhost:~/llama$ npm install dalai
npm ERR! code 1
npm ERR! path /home/smhanov/llama/node_modules/node-pty
npm ERR! command failed 
npm ERR! command sh -c node scripts/install.js

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/smhanov/.npm/_logs/2023-04-12T16_31_28_771Z-debug-0.log

node version is 18.5.0 python version is 3.10.6

I also tried using the npx method:

smhanov@localhost:~/llama$ npx dalai llama install 7B
Need to install the following packages:
      [email protected]
Ok to proceed? (y) 

The command takes about 10 seconds.

smhanov@localhost:~/llama$ npx dalai serve
Need to install the following packages:
  [email protected]
Ok to proceed? (y) 
smhanov@localhost:~/llama$ 

After this nothing seems to happen. There is no server running on port 3000.

The error in the logs mentioned above is: 1649 timing build:link:node_modules/semver Completed in 15ms 1650 timing build:link:node_modules/sha.js Completed in 15ms 1651 timing build:link:node_modules/utp-native Completed in 15ms 1652 timing build:link Completed in 21ms 1653 info run [email protected] install node_modules/bufferutil node-gyp-build 1654 info run [email protected] install { code: 0, signal: null } 1655 timing build:run:install:node_modules/bufferutil Completed in 675ms 1656 info run [email protected] install node_modules/node-pty node scripts/install.js 1657 info run [email protected] install { code: 1, signal: null } 1658 timing reify:rollback:createSparse Completed in 938ms 1659 timing reify:rollback:retireShallow Completed in 0ms 1660 timing command:install Completed in 19961ms 1661 verbose stack Error: command failed 1661 verbose stack at ChildProcess. (/snap/node/7268/lib/node_modules/npm/node_modules/@npmcli/promise-spaw n/lib/index.js:53:27) 1661 verbose stack at ChildProcess.emit (node:events:513:28) 1661 verbose stack at maybeClose (node:internal/child_process:1091:16) 1661 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:302:5) 1662 verbose pkgid [email protected] 1663 verbose cwd /home/smhanov/llama 1664 verbose Linux 5.15.0-69-generic 1665 verbose node v18.15.0 1666 verbose npm v9.5.0 1667 error code 1 1668 error path /home/smhanov/llama/node_modules/node-pty 1669 error command failed 1670 error command sh -c node scripts/install.js 1671 verbose exit 1 1672 timing npm Completed in 20089ms 1673 verbose unfinished npm timer reify 1681317088901 1674 verbose unfinished npm timer reify:build 1681317106583 1675 verbose unfinished npm timer build 1681317106585 1676 verbose unfinished npm timer build:deps 1681317106585 1677 verbose unfinished npm timer build:run:install 1681317106641 1678 verbose unfinished npm timer build:run:install:node_modules/node-pty 1681317107318 1679 verbose code 1 1680 error A complete log of this run can be found in: 1680 error /home/smhanov/.npm/_logs/2023-04-12T16_31_28_771Z-debug-0.log

In addition, trying to install using the docker compose method fails at the docker compose step, due to a python venv issue.

#0 363.2 npm ERR! /root/dalai/venv/bin/pip install --user torch torchvision torchaudio sentencepiece numpy
#0 363.2 npm ERR! exit
#0 363.2 npm ERR! root@buildkitsandbox:~/dalai/node_modules/dalai# /root/dalai/venv/bin/pip install --user torch 
torchvision torchaudio sentencepiece numpy
#0 363.2 npm ERR! ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
#0 363.2 npm ERR! root@buildkitsandbox:~/dalai/node_modules/dalai# exit
#0 363.2 npm ERR! exit
#0 363.2 npm ERR! Error Error: dependency installation failed   
#0 363.2 npm ERR!     at Dalai.setup (/root/dalai/node_modules/dalai/index.js:510:15)
#0 363.2
#0 363.2 npm ERR! A complete log of this run can be found in:
#0 363.2 npm ERR!     /root/.npm/_logs/2023-04-12T16_42_55_249Z-debug-0.log
------
failed to solve: executor failed running [/bin/sh -c npm install [email protected]]: exit code: 1

smhanov avatar Apr 12 '23 16:04 smhanov

Having the same problem here.

gwerneckp avatar Apr 12 '23 19:04 gwerneckp

+1

debsdebsenson avatar Apr 13 '23 21:04 debsdebsenson

+1 But on Win 11

MayurVirkar avatar Apr 14 '23 11:04 MayurVirkar

+1

gkhngyk avatar Apr 19 '23 18:04 gkhngyk

I ended up using llama.cpp instead. It is very easy to get up and running and also supports alpaca and vicuna models. But it only runs on CPU, not GPU.

smhanov avatar Apr 20 '23 12:04 smhanov