Building a Hermetic Python Environment with Conda in Bazel
summary
Bazel rules fetch Conda packages as parallel per-package remote repos and then copy them into a central repository rule so Python extension modules and shared libraries have a single runtime layout that works on NFS. A generated .bzl lock file generator pins solver results and is auto-updated by a GitHub Actions cron; overrides (excludes, extra deps, aliases) act as escape hatches for bad Conda metadata. The system produces tarball deployments that run across many Linux targets and keeps build/test environments nearly identical with acceptable build times.
AI-written summary · about
chapters (7)
- 0:00Introduction to conda-bazel
- 1:16Project design goals
- 2:32Build and runtime performance
- 4:22Lock files and reproducibility
- 5:16Escape hatches and metadata
- 6:47Lock file automation
- 8:33Lessons and summary








