Skip to content

Scripts Reference

The scripts/ directory contains automation scripts for building, testing, and managing BioML-bench environments and agents.

Build Scripts

build_base_env.sh

Builds the foundational Docker image (biomlbench-env) with biomedical libraries and dependencies.

Usage:

./scripts/build_base_env.sh

Features: - Installs Python 3.11 with conda - Includes biomedical libraries (RDKit, BioPython) - Configures ML frameworks (TensorFlow, PyTorch) - Sets up the grading server environment - Performs post-build validation tests

Requirements: - Docker installed and running - Internet connection for downloading dependencies - ~10GB disk space for the image

Example Output:

๐Ÿงฌ Building BioML-bench Base Environment
=======================================
๐Ÿ“‹ Pre-build checks...
โœ… environment/Dockerfile
โœ… environment/requirements.txt
๐Ÿ”จ Building biomlbench-env Docker image...
โœ… Successfully built biomlbench-env image
๐Ÿงช Testing base image...
โœ… Python is available
โœ… BioML-bench is importable
โœ… Biomedical and ML dependencies are available
โœ… Agent conda environment is ready
๐ŸŽ‰ Base environment build completed successfully!

build_agent.sh

Builds Docker images for individual agents.

Usage:

./scripts/build_agent.sh <agent-name>

# Examples
./scripts/build_agent.sh dummy
./scripts/build_agent.sh aide

Features: - Builds agent-specific Docker images - Inherits from biomlbench-env base image - Configures agent-specific dependencies - Sets up environment variables and entrypoints

Agent Directory Structure:

agents/<agent-name>/
โ”œโ”€โ”€ Dockerfile          # Agent-specific build instructions
โ”œโ”€โ”€ config.yaml         # Agent configuration
โ”œโ”€โ”€ start.sh            # Agent execution script
โ”œโ”€โ”€ requirements.txt    # Additional dependencies
โ””โ”€โ”€ src/                # Agent source code

Additional Features: - Multi-stage builds for smaller images - Build caching optimization - Security scanning integration - Performance benchmarking - Automated testing of built images

Testing Scripts

test_environment.sh

Comprehensive testing of the BioML-bench environment setup.

Usage:

./scripts/test_environment.sh