> For the complete documentation index, see [llms.txt](https://docs.gevulot.com/gevulot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gevulot.com/gevulot-docs/firestarter/deploy-provers/prover-packaging.md).

# Prover Packaging

Prover packaging on Firestarter works by converting container image into a Linux-based VM image. Any program that can run in a container, can run on Firestarter.

## Prerequisites

* Linux or MacOS as a host machine
* Install `gvltctl` from [releases](https://github.com/gevulotnetwork/gvltctl/releases/latest)
* Install following programs from your distributions package manager:
  * **Ubuntu:**
    * `git build-essential libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm bc ca-certificates podman`
  * **Fedora:**
    * gcc
    * make
    * libtool
    * objtool
    * flex
    * bison
    * kernel-devel
    * git
    * podman

## Runtime environment

The VM image contains the Linux kernel, Firestarter-specific init, and the container image file tree that is passed for the `gvltctl build` command.

All the input files are mounted read-only under `/mnt/gevulot/input` which is the only allowed location for files passed in `Task` `inputContexts`.

All the output files are mounted read-write under `/mnt/gevulot/output` which is the only writable location for files that are specified in `Task` `outputContexts` .

## Package CPU-only prover

The first step is to ensure that the prover either has a pre-built container image or a working Containerfile/Dockerfile that can be used to build the container image.

### Container image

Once the prover works in the container, then it can be packaged into a VM image:\
`gvltctl build --container containers-storage:localhost/my_prover:latest -o prover.img`

That command uses container image build with *podman* locally and packages it into a VM image.

**NOTE:** This command will build Linux kernel from sources, which may take significant amount of time on small machines.

### Containerfile

Building a VM image from a Containerfile works similarly:

`gvltctl build --containerfile Containerfile -o prover.img`

## Package GPU accelerated prover

**NOTE:** For now, only nVidia GPUs are supported.

The GPU-accelerated prover packaging is nearly the same as CPU-only, but there are a couple of additional requirements:

* The source container must have all nVidia runtime libraries present. This is easiest to achieve by using the official `docker.io/nvidia/cuda` as the base image. As of writing, the latest runtime tag is [`12.6.2-runtime-ubuntu24.04`](https://gitlab.com/nvidia/container-images/cuda/blob/master/dist/12.6.2/ubuntu2404/runtime/Dockerfile)
* `--nvidia-drivers` argument specified for `gvltctl build` - this will build nVidia GPU drivers to the VM image, matching the installed kernel

Building the VM image is simple:

`gvltctl build --container containers-storage:localhost/my_gpu_prover:latest --nvidia-drivers -o gpu_prover.img`

## Advanced options for VM image

The `gvltctl build` provides flexible options for customizing the VM image if advanced tuning is needed for some reason. This is not advisable, however, unless you really know what you are doing.

For further information: Refer to `gvltctl build --help` and respective source code for [gvltctl](https://github.com/gevulotnetwork/gvltctl) and [mia](https://github.com/gevulotnetwork/mia).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gevulot.com/gevulot-docs/firestarter/deploy-provers/prover-packaging.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
