sudo apt install python3-pip python3-venv squashfs-tools
pip3 install aleph-client
For starting to run aleph-vm on mac you have to initialize a VM.
You will need VirtualBox, a free and open-source hosted hypervisor (or virtual machine manager) for the next step.
You can download and install it here .
Vagrant is an open-source software product for building and maintaining portable virtual software development environments based on VirtualBox.
Run following command for installing it (before make sure homebrew is installed on your mac).
brew install vagrant
Once Vagrant is installed, go to your working repository and initialize vagrant
vagrant init boxomatic/debian-11
A Vagrantfile
(in Ruby) will be created, you can consult it if you wish.
Now in order to instantiate a new virtual machine, run the following command:
vagrant up
If this does not work, check out you System Preferences > Security and Privacy and allow the "System software from developer" in the bottom of the window.
Once the command is down, your virtual machine will be booted and ready!
Open the vagrantfile and add following config.vm.box
config.vm.network "forwarded_port", guest:8000, host:8000
pip install -t /opt/packages -r requirements.txt
mksquashfs /opt/packages packages.squashfs
aleph upload packages.squashfs
/opt/go-ipfs/ipfs daemon
ipfs add packages.squashfs
| added QmWWX6BaaRkRSr2iNdwH5e29ACPg2nCHHXTRTfuBmVm3Ga venv.squashfs
aleph pin QmWWX6BaaRkRSr2iNdwH5e29ACPg2nCHHXTRTfuBmVm3Ga
aleph program upload ./my-program main:app
Press Enter at the following prompt to use the default runtime:
Ref of runtime ? [bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4]
Press Y
to add extra volumes to your program:
Add volume ? [y/N] Y
Description: Python Packages
Mount: /opt/packages
Ref: 61f43ab261060ff94838dc94313a70cdb939a5fc6c99924b96d55dcc2c108d03
Use latest version ? [Y/n]
Finally, press Enter to skip adding more volumes.
Add volume ? [y/N]