Skip to main content

Overview

Every Tinfoil Container requires a tinfoil-config.yml file in the root of your GitHub repository. This file defines the enclave runtime, resource allocation, container configuration, and request routing. For a pre-filled tinfoil-config.yml, follow along with the quickstart guide.

File location

The file must be named tinfoil-config.yml and placed at the root of your repository. Tinfoil fetches this file from GitHub when you deploy or validate a container. The repository must be public. Tinfoil measures your config at each tag and publishes the measurement to the Sigstore transparency log, so clients can verify against it. The Docker image the config references can still be private — see Private images.

Top-level fields

Valid resource values

Memory values correspond to 8 GB, 16 GB, 32 GB, 64 GB, 128 GB, 256 GB, and 512 GB respectively.

Container spec

Each entry in the containers list defines a container to run inside the enclave. The image field must include a SHA256 digest (e.g. image:tag@sha256:...), not only a mutable tag such as :latest. The digest pins the exact image binary and ensures it can be verified in the transparency log. To get the digest, run docker pull <image> && docker inspect --format='{{index .RepoDigests 0}}' <image>.
If you build your own image as part of the release workflow, use a placeholder digest (sha256:0000...) on main — the release workflow substitutes the real digest into the tagged commit. See Building images.

GPU configuration

GPU workloads use a two-step allocation:
  1. Attach GPUs to the enclave with the top-level gpus field, set to either 1 or 8. NVIDIA confidential computing restricts enclaves to those two sizes.
  2. Expose GPUs to a container with runtime: nvidia and a container-level gpus value. Use gpus: all to give the container every GPU attached to the enclave — this is the right choice for both single-GPU and most multi-GPU setups. Individual indices (e.g. gpus: "0,1") are only needed when running multiple containers in an 8-GPU enclave and splitting GPUs between them.
GPU containers typically also set ipc: host so the NVIDIA runtime can share memory with host processes.

Environment variable formats

Environment variables support two formats:

Model weights

GPU inference containers often need large model weights in addition to the Docker image that runs the server. Use the top-level models list to mount verified model-weight artifacts prepared in the dashboard’s Models tab. See Model weights for the field reference, the preparation workflow, and a complete vLLM example.

Validation

You can validate your config before deploying. In the dashboard, click New Container and select your repo and tag. Tinfoil fetches your tinfoil-config.yml and checks that:
  • CPU, memory, and GPU values are valid
  • Resource usage is within your org’s limits
  • Model weight references are valid when models is set
  • Referenced secrets exist for the repository or organization
  • The container image is accessible and includes a SHA256 digest
If validation fails, the dashboard shows specific error messages explaining what needs to be fixed.

Container naming constraints

Examples

Template

The tinfoil-containers-template repo contains a ready-to-use tinfoil-config.yml with the latest cvm-version value. Create a new repo from this template to get started quickly.