Custom Runtimes
Custom runtimes can be created by customizing the filesystem of Linux distributions or entirely from scratch.
Base filesystem
Refer to the installation guide of your distribution for the procedure to obtain a base root filesystem.
⚠️ Only 64-bit Intel/AMD processors (x86_64) are supported on the network at the moment . Make sure you build runtimes on that architecture.
Debian Bullseye
mkdir ./rootfs
debootstrap --arch=amd64 --variant=minbase bullseye ./rootfs http://deb.debian.org/debian/
Ubuntu 22.04
Following the next steps, you will be able to create and customize your own Debian based runtime:
1. Install required dependencies
First you need to install the required tools to be able to generate you own runtime.
Using Debian and Ubuntu systems:
Using Nix:
2. Obtain the build scripts
Download the files create_disk_image.sh
, init0.sh
and init1.py
from the
official runtime:
https://github.com/aleph-im/aleph-vm/tree/main/runtimes/aleph-debian-11-python
Customize these files to suit your needs.
3. Build a new runtime
Running the script create_disk_image.sh
as root will create a file named rootfs.squashfs
:
4. Publish the runtime on aleph.im
If this command fails due to an HTTP 413Request Entity Too Large
, then upload your root.squashfs
using the IPFS desktop app or similar client. Then use the obtained CID with this command to pin it with the Aleph network:
This command will provide you with the item_hash
of the custom runtime,
that you can then use when creating the program.