← all repositories
cresset-template/cresset

Docker boilerplate that finally tames PyTorch builds from source

A Makefile-and-Docker-Compose scaffold for teams who need reproducible GPU environments without surrendering to NVIDIA's blessed images.

721 stars Dockerfile ML FrameworksLLMOps · Eval
cresset
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

Cresset is a Docker Compose template for PyTorch projects that need to compile from source against specific CUDA/cuDNN versions. It wraps the usual footguns—driver compatibility checks, compute capability flags, rootless Docker support—into make commands and a configurable .env file. Four service tiers (train, devel, ngc, simple) trade off build complexity against reproducibility.

The interesting bit

The simple service is the quiet hero: it skips compiled dependencies entirely, using conda-lock for bit-for-bit reproducibility when corporations ban unofficial base images. Meanwhile train will actually build PyTorch from source with your target GPU’s compute capability baked in—useful when prebuilt wheels don’t match your hardware generation.

Key highlights

  • Builds PyTorch from source with arbitrary git tags (not just releases), targeting specific CUDA compute capabilities
  • Rootless Docker support with ADD_USER=exclude to avoid permission theater in locked-down environments
  • docker-compose.override.yaml pattern for per-host volumes and secrets, kept out of git
  • WSL2-tested, with explicit warnings about Windows Security real-time protection slowdown
  • Makefile reads from .env automatically, so you don’t retype SERVICE=train into oblivion

Caveats

  • README warns that NGC images change between releases and configs may not port forward; this is a maintenance burden if you drift from NVIDIA’s cadence
  • Windows users must disable antivirus real-time protection for “best performance”—a blunt requirement in some enterprise settings
  • Source build is slow; the Docker cache helps only if configurations are identical, which they rarely are across team members

Verdict

Worth a look if your team has been hand-rolling Dockerfiles for each new GPU generation or fighting conda environments on shared servers. Skip it if you’re happily using standard PyTorch wheels and cloud instances with preinstalled drivers.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.