dalai
dalai copied to clipboard
Not possible to install on Ubuntu 22.04
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.
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
Having the same problem here.
+1
+1 But on Win 11
+1
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.