amica icon indicating copy to clipboard operation
amica copied to clipboard

Colab

Open Vuizur opened this issue 1 year ago • 1 comments

I think it would be nice to create a colab.

The following somewhat works:

# Install node
!dpkg --configure -a
!sudo apt-get update
!sudo apt-get install -y ca-certificates curl gnupg
!sudo mkdir -p /etc/apt/keyrings
!curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
!NODE_MAJOR=21 && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
!sudo apt-get update
!sudo apt-get install nodejs -y

# Clone repo
!git clone https://github.com/semperai/amica.git
%cd amica
!npm install

from google.colab.output import eval_js
print(eval_js("google.colab.kernel.proxyPort(3000)"))

import subprocess #I don't know if that is even needed
subprocess.Popen(["npm", "run", "dev"])

It only gives some error because of the service worker and loading the avatar takes some time, but the echo mode works fine in my tests.

Vuizur avatar Nov 29 '23 09:11 Vuizur

Cool! I'm not very familiar with colab but I'll leave this open if someone else has same idea. There is a script in ./scripts/install_osx.sh that might be useful to set up with a little modification.

kasumi-1 avatar Nov 30 '23 19:11 kasumi-1