How to test your VM locally
You can test your VM locally without uploading each version on the aleph.im network.
To do this, you'll want to use the --fake-data-program
or -f
argument of the VM Supervisor.
0. Build the required squashfs volumes
Build or download the required squashfs volumes:
ℹ️ This does not work in a container since debootstrap requires mounting volumes.
This will create a local runtime root filesystem in ./runtimes/aleph-debian-11-python/rootfs.squashfs
.
./example/volumes/volume-venv.squashfs
.
1. In a Docker container
Run the developer image, mounting the two generated volumes:
docker run -ti --rm \
-v "$(pwd)/runtimes/aleph-debian-11-python/rootfs.squashfs:/opt/aleph-vm/runtimes/aleph-debian-11-python/rootfs.squashfs:ro" \
-v "$(pwd)/examples/volumes/volume-venv.squashfs:/opt/aleph-vm/examples/volumes/volume-venv.squashfs:ro" \
--device /dev/kvm \
-p 4020:4020 \
docker.io/alephim/vm-supervisor-dev
Or launch this command using:
Within the container, run the supervisor with fake data:
python -m vm_supervisor --print-settings --very-verbose --system-logs --fake-data-program ./examples/example_fastapi
ℹ️ The command is in your .bash_history, press key up to skip typing it.
2. On your system
2.a. Install the system requirements
Refer to the aleph.im VM supervisor documentation to install the system requirements.