The Python AI assistance library.
Install wasmtime
:
curl https://wasmtime.dev/install.sh -sSf | bash
Download python.wasm
:
wget https://github.com/assistancechat/assistance/releases/download/python-wasm/python-3.11.1.wasm -O ~/.assistance/wasm/python.wasm
Test that it works:
wasmtime \
--env PYTHONPATH=/assistance:/assistance/.venv/lib/python3.11/site-packages \
--mapdir /assistance::$HOME/git/assistance \
~/.assistance/wasm/python.wasm \
-- -c "print('hello world!')"
Acknowledgment to https://wasmlabs.dev/articles/python-wasm32-wasi/ where much of the above was inspired from.
First time setup of supervisor:
sudo ln -s $HOME/git/assistance/dev/server/supervisor.conf /etc/supervisor/conf.d/assistance.conf
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status assistance
Restart supervisorctl
sudo supervisorctl restart assistance
First time setup of nginx:
sudo ln -s $HOME/git/assistance/dev/server/nginx-site.conf /etc/nginx/sites-enabled/assistance
sudo nginx -s reload
poetry env use $(which python)
rsync -r assistance:~/.assistance/* ~/.assistance/
rsync -r server:~/.assistance/* ~/.assistance/
poetry run python -m ipykernel install --user --name assistance
jupyter lab --ip=10.0.0.163