Files
cs249r_book/tinytorch/scripts/build-book.sh
Vijay Janapa Reddi c602f97364 feat: integrate TinyTorch into MLSysBook repository
TinyTorch educational deep learning framework now lives at tinytorch/

Structure:
- tinytorch/src/         - Source modules (single source of truth)
- tinytorch/tito/        - CLI tool
- tinytorch/tests/       - Test suite
- tinytorch/site/        - Jupyter Book website
- tinytorch/milestones/  - Historical ML implementations
- tinytorch/datasets/    - Educational datasets (tinydigits, tinytalks)
- tinytorch/assignments/ - NBGrader assignments
- tinytorch/instructor/  - Teaching materials

Workflows (with tinytorch- prefix):
- tinytorch-ci.yml           - CI/CD pipeline
- tinytorch-publish-dev.yml  - Dev site deployment
- tinytorch-publish-live.yml - Live site deployment
- tinytorch-build-pdf.yml    - PDF generation
- tinytorch-release-check.yml - Release validation

Repository Variables added:
- TINYTORCH_ROOT  = tinytorch
- TINYTORCH_SRC   = tinytorch/src
- TINYTORCH_SITE  = tinytorch/site
- TINYTORCH_TESTS = tinytorch/tests

All workflows use \${{ vars.TINYTORCH_* }} for path configuration.

Note: tinytorch/site/_static/favicon.svg kept as SVG (valid for favicons)
2025-12-05 19:23:18 -08:00

36 lines
885 B
Bash
Executable File

#!/bin/bash
# Build Jupyter Book documentation
# Usage: ./scripts/build-book.sh
set -e # Exit on error
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}📚 Building Jupyter Book documentation...${NC}"
# Check if jupyter-book is installed
if ! command -v jupyter-book &> /dev/null; then
echo "❌ jupyter-book not found. Install it with:"
echo " pip install jupyter-book"
exit 1
fi
# Build the book
echo -e "${BLUE}🔨 Running: jupyter-book build docs/${NC}"
jupyter-book build docs/
echo -e "${GREEN}✅ Book built successfully!${NC}"
echo -e "${BLUE}📖 Open: docs/_build/html/index.html${NC}"
# Optionally open in browser (macOS)
if [[ "$OSTYPE" == "darwin"* ]]; then
read -p "Open in browser? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
open docs/_build/html/index.html
fi
fi