mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-11-16 12:05:12 -06:00
The toolchain folder is now binder/, and the root ./binder symlink is gone. The command is ./binder/binder: a plain path to the script, with no link and no install step. Every invocation moved with it: pre-commit entries, workflow steps, the VS Code extension's command palette, help text, and docs. - bindery/ paths and bindery.* imports, including the chapter code cells that import binder.tools.figures, now name binder/. - Binder (mybinder.org) reads its configuration from a root binder/ folder and refuses to build when binder/ and .binder/ both exist. .binder/postBuild and .binder/requirements.txt move into binder/, so the TinyTorch "Launch Binder" buttons keep working; binder/README.md records which file names the toolchain must not use there. - contributors/projects.json still pointed the book's contributor record at publishing/; it now names binder/, where that .all-contributorsrc lives. - The margin-figure reader-link audit report linked its 222 figures through the retired quarto/ tree; the links now resolve under books/. The hooks reformatted hidden Python cells and trimmed whitespace in the Volume II chapters whose figure imports this rename touches. Checks: ./binder/binder check cli passes (contract and canonical hooks), binder.tools.figures imports, and every workflow YAML file parses. binder test suite, excluding the four modules that cannot import mlsysim through the root symlink (fixed separately): 7 failed, 346 passed. The GitHub repository variables BOOK_ROOT, BOOK_TOOLS, BOOK_DEPS, and BOOK_DOCKER still name the retired book/ layout and must change when this reaches origin.
2.3 KiB
2.3 KiB
Python Dependencies
This directory contains Python dependencies organized in a clean, modular structure.
Structure
requirements/
├── base.txt # Core dependencies (pandas, requests, etc.)
├── production.txt # Production-specific (includes base.txt)
└── development.txt # Full ML stack (includes production.txt)
Files
requirements/base.txt (Core Dependencies)
- Essential packages needed by all environments
- Jupyter, pandas, requests, PyYAML, etc.
- Lightweight foundation (~200MB)
requirements/production.txt (Container/Build)
- Includes
base.txt+ production-specific packages - OpenAI API, Groq, pre-commit, Ghostscript, etc.
- Excludes heavy ML libraries
- Optimized for containers (~500MB)
requirements/development.txt (Full ML Stack)
- Includes
production.txt+ ML dependencies - PyTorch, sentence-transformers, FAISS, scikit-learn
- Required for cross-reference generation
- Complete development environment (~4GB)
Convenience Files
requirements.txt (Default - Full)
pip install -r requirements.txt
References requirements/development.txt for complete functionality
requirements-build.txt (Container Optimized)
pip install -r requirements-build.txt
References requirements/production.txt for lightweight builds
requirements-dev.txt (Development Alias)
pip install -r requirements-dev.txt
Alias for requirements/development.txt
Usage Patterns
Container Builds (GitHub Actions)
RUN pip install -r tools/dependencies/requirements-build.txt
Result: Fast builds, small containers (~500MB Python deps)
Local Development
# For full development (recommended)
pip install -r tools/dependencies/requirements.txt
# For container-optimized builds only
pip install -r tools/dependencies/requirements-build.txt
Cross-Reference Generation
# Use full dependencies for ML tools
pip install -r tools/dependencies/requirements.txt
python tools/scripts/cross_refs/cross_refs.py
Migration Notes
requirements.txt: Full dependencies (unchanged for backward compatibility)requirements-build.txt: New minimal set for containers (~500MB vs ~4GB)- Containers should switch to
requirements-build.txtfor 3-4GB savings - Local development: Continue using
requirements.txt