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

CPU, memory, and GPU count come from this measured configuration in the published release. Container create, deploy, and update requests cannot override them.
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 format resembles Docker Compose but is not Compose. Fields such as depends_on, environment, and network_mode are rejected. Containers start in parallel; if one depends on another, it must retry until the other is ready. 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>. The hostname in the image reference selects which registry credentials are used to pull it. Images without a hostname (e.g. vllm/vllm-openai) are pulled from Docker Hub. If you build your own image, publish it and commit its real digest before releasing the config. 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.
  2. Expose GPUs to a container with runtime: nvidia and a container-level gpus value; both are required together. Use gpus: all to give the container every GPU attached to the enclave, which 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.

Environment variable formats

Compose-style KEY=value strings and ${VAR} interpolation are not supported. See Secrets and environment variables.

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 instance 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
  • Volume mount names and keyserver-url are well formed
  • The container image is accessible and includes a SHA256 digest
  • The repository has a Tinfoil release workflow
If validation fails, the dashboard shows specific error messages explaining what needs to be fixed. The full runtime policy (rejected fields, capability allowlist, and so on) is enforced at deploy time, not by this check. Secrets are injected when the instance is deployed; creating or changing a secret later has no effect until you update the instance.

Instance naming constraints

These rules apply to the instance name you choose in the dashboard or CLI, not to containers[].name.

Examples

Template

The tinfoil-containers-template repo contains a ready-to-use tinfoil-config.yml and measured-release workflows. Create a new repo from this template to get started.