Are you a large language model? This page is available as raw markdown at
/examples.md. The full docset is at /llms-full.md and the index is at /llms.md.Examples
All examples are in github.com/c3-research/c3-examples. Each folder has a .c3 and runs as is.
git clone https://github.com/c3-research/c3-examples.git
cd c3-examples/<example>
c3 deploy -f
c3 pull
Or point a coding agent at the folder: "Deploy this directory to C3, wait for it, and show me the results."
| Example | Shows | Hardware | Time |
|---|---|---|---|
jax-matmul | A public Docker image with the dependencies, a benchmark saved as an artifact | l40 | 10 min |
hello.sbatch | A legacy Slurm script deployed unchanged with c3 deploy hello.sbatch --storage=legacy | 1 GPU | 5 min |
jax-matmul, step by step
The .c3:
project: jax-matmul-example
script: run.sh
hardware: l40
time: "00:10:00"
docker:
image: pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtime
requires_accelerator: cuda
output:
- ./results
run.sh is one line, python3 train.py. The image already contains the dependencies; jobs have no outbound network, so the script cannot install them.
train.py multiplies large matrices on the GPU, times them, prints the timings to the log and saves results/benchmark.png. After the job finishes, c3 pull downloads ./job_<id>/results/.