dalai icon indicating copy to clipboard operation
dalai copied to clipboard

Installation breaks in-between

Open leandermaerkisch opened this issue 1 year ago • 8 comments

First, thanks a lot for your incredible work!

I'm using macOS. I followed the instructions by installing relevant packages and ran the command npx dalai alpaca install 7B. It starts the execution and creates a dalai directory. Yet, it does not download any files. image

I'd be grateful to try out this marvelous contribution"

Here are the latest logs: 968 info run [email protected] install node_modules/node-pty node scripts/install.js 969 info run [email protected] install { code: 0, signal: null } 970 timing build:run:install:node_modules/node-pty Completed in 1087ms 971 timing build:run:install Completed in 1087ms 972 info run [email protected] postinstall node_modules/dalai node setup 973 info run [email protected] postinstall node_modules/node-pty node scripts/post-install.js 974 info run [email protected] postinstall { code: 0, signal: null } 975 timing build:run:postinstall:node_modules/node-pty Completed in 35ms 976 info run [email protected] postinstall { code: 1, signal: null } 977 timing reify:rollback:createSparse Completed in 199ms 978 timing reify:rollback:retireShallow Completed in 0ms 979 timing command:exec Completed in 4745ms 980 verbose exit 1 981 timing npm Completed in 4765ms 982 verbose unfinished npm timer reify 1679263514037 983 verbose unfinished npm timer reify:build 1679263514831 984 verbose unfinished npm timer build 1679263514831 985 verbose unfinished npm timer build:deps 1679263514831 986 verbose unfinished npm timer build:run:postinstall 1679263515922 987 verbose unfinished npm timer build:run:postinstall:node_modules/dalai 1679263515922 988 verbose code 1

leandermaerkisch avatar Mar 19 '23 22:03 leandermaerkisch

I was able to make some progress on this by running it with sudo, and then following the prompts to download and install the Xcode packages in the modal that pops up.

patmifsud avatar Mar 20 '23 11:03 patmifsud

I was able to make some progress on this by running it with sudo, and then following the prompts to download and install the Xcode packages in the modal that pops up.

thanks! i was having the same issue. using sudo npx dalai llama install 7B 13B and now it's downloading. Just waiting now.

hashmil avatar Mar 20 '23 11:03 hashmil

In the end it was actually an issue with homebrew if you’re still struggling with it. I had to try reinstalling homebrew again, Making sure to follow the instructions at the end of the installation to run commands to add the homebrew path, or something similar.

patmifsud avatar Mar 20 '23 13:03 patmifsud

I have encountered the same exact issue with a fedora 36 VM. Running with sudo or as root does not work and the linux installation does not have homebrew

Autistaman avatar Mar 20 '23 18:03 Autistaman

I also cannot install this, on either Windows or Fedora 36. Both fail in the reify:dalai step, where it just hangs.

drwootton avatar Mar 21 '23 17:03 drwootton

Most probably the very last step in the installation flow (npm verb unfinished npm timer build:run:postinstall:node_modules/dalai ...) is the one where the actual model download is happening. And problem somewhere on the server side. Just because after a number of attempts it managed to download everything.

For a proper troubleshooting:

  • first make sure you have all the packages installed for your distro, as the documentation mentions
  • make sure that by default your python3 (which is usually symlink /usr/bin/python3) is pointing to python3.9 or lower, and not python3.10 or higher:
sh-5.2# ls -la /usr/bin/python3
lrwxrwxrwx 1 root root 9 Mar 21 14:01 /usr/bin/python3 -> python3.9
  • run npx with --verbose option to see some more logs, while installing the stuff:
sudo npx --verbose dalai llama install 7B

Below worked fine for me in docker with Fedora 37 image:

docker run   -p 3000:3000  -it --rm fedora /bin/sh
yum install npm python3.9.x86_64 make automake gcc gcc-c++ kernel-devel python3-virtualenv git -y
npm install -g [email protected]
cd /usr/bin ; unlink python3 ; ln -s python3.9 python3
npx dalai llama install 7B
npx dalai serve

kha84 avatar Mar 21 '23 20:03 kha84

Worth noting I went through a lot of debug and troubleshooting steps, but ultimately it took time. Not sure if any of the steps I took were helpful or necessary ultimately, but after tailing the install logs and seeing that it was actually busy even though the --verbose script didn't specific updates it became clear that I was killing the process at different points in the installation. Now it's downloading the .bin file. I have a terribly slow rural cellular connection, so this is why patience can sometimes pay off for me. Hope that helps others who might be a little to anxious to kill the script when it gets stuck at the reify:dalai step.

CoeusCC avatar Mar 21 '23 23:03 CoeusCC

Thanks a lot, @afif-malghani!

leandermaerkisch avatar Jul 19 '23 08:07 leandermaerkisch