Self-hosted VM images
Publishing VM images outside Golem's repository
At the same time, we realize that application developers may choose to publish said images in other, publicly-accessible locations at their discretion.
When you upload and image to Golem's repo, the image hash is calculated and conveniently provided to you after a successful upload.
When you decide not to push the image that way, you need to calculate the SHA3 hash on your own. Golem's VM images use 224-bit SHA3 hashes and the easiest way to obtain such a hash is to run the
sha3sumtool on the
apt install sha3sum
brew install sha3sum
sha3sum -a 224 <image_filename.gvmi>
The calculated hash is then printed alongside the filename and you need to note down this hash since it needs to be provided to the API so that later, the providers can verify the integrity of the VM images they download before they're able to deploy them.
Once the VM image file is uploaded to a location of your choosing and you have the file's hash, you only need to provide this data to the API when the
Packagefor your app is constructed.
In order to do that, use the following
package = await vm.repo(
# we still need to provide the image's hash because
# the image's integrity is validated by the runtime on the provider node
# the hash can be calculated by running `sha3sum -a 224 <image_filename.gvmi>`
# the URL can point to any publicly-available location on the web
For full usage, please refer to the relevant part of the API reference: