bv

a uv-style tool manager for bioinformatics

what it is

bv installs bioinformatics tools as containers, pins them to exact image digests in a lockfile, and reproduces any analysis environment with a single bv sync. Same manifest, same lockfile, on Docker or Apptainer.

No conda solver thrash, no per-tool install instructions, no "works on my machine" drift between a laptop and an HPC node. Every binary a tool exposes is on PATH automatically; pipelines just call blastn or colabfold_batch and bv routes to the right container.

tl;dr

# 1. install a container runtime (pick one)
curl -fsSL https://get.docker.com/rootless | sh           # docker, on a laptop
conda install -c conda-forge apptainer                    # apptainer, on HPC

# 2. install bv
curl -fsSL https://raw.githubusercontent.com/mlberkeley/bv/main/install.sh | sh
# or: cargo install biov

# 3. fold a protein in 3 minutes (needs an NVIDIA GPU)
mkdir protein-demo && cd protein-demo
bv add colabfold

cat > fold.py << 'EOF'
import subprocess, json, shutil
from pathlib import Path

Path("trpcage.fasta").write_text(">trp-cage\nNLYIQWLKDGGPSSGRPPPS\n")
Path("output").mkdir(exist_ok=True)

cmd = ["colabfold_batch"] if shutil.which("colabfold_batch") else ["bv", "run", "colabfold_batch"]
subprocess.run(cmd + ["--num-recycle", "3", "/workspace/trpcage.fasta", "/workspace/output"], check=True)

scores = sorted(Path("output").glob("*scores*.json"))[0]
plddt = json.loads(scores.read_text())["plddt"]
print(f"mean pLDDT: {sum(plddt)/len(plddt):.1f}")
EOF

bv exec python3 fold.py

# 4. commit and reproduce anywhere
git add bv.toml bv.lock
git commit -m "pin analysis environment"
# on any other machine: `bv sync` pulls the exact same images by digest

links