Overview
Every Tinfoil Container requires atinfoil-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 namedtinfoil-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 thecontainers 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:- Attach GPUs to the enclave with the top-level
gpusfield, set to either1or8. - Expose GPUs to a container with
runtime: nvidiaand a container-levelgpusvalue; both are required together. Usegpus: allto 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
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-levelmodels 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 yourtinfoil-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-urlare well formed - The container image is accessible and includes a SHA256 digest
- The repository has a Tinfoil release workflow
Instance naming constraints
These rules apply to the instance name you choose in the dashboard or CLI, not tocontainers[].name.
Examples
Template
The tinfoil-containers-template repo contains a ready-to-usetinfoil-config.yml and measured-release workflows. Create a new repo from this template to get started.
