mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-29 17:20:21 -05:00
- Move Dockerfile to docker/quarto-build/ - Add docker/quarto-build/README.md with documentation - Add docker/quarto-build/.dockerignore for build optimization - Update workflow to use new Dockerfile path - Update documentation to reflect new structure - Improve organization and maintainability
2.1 KiB
2.1 KiB
Quarto Build Container
This directory contains the Docker container configuration for the MLSysBook build system.
Purpose
The container pre-installs all dependencies to eliminate the 30-45 minute setup time for Linux builds, reducing build times from 45 minutes to 5-10 minutes.
Structure
docker/quarto-build/
├── Dockerfile # Container definition
├── README.md # This file
└── .dockerignore # Files to exclude from build
Container Contents
- Base: Ubuntu 22.04
- TeX Live: Full distribution (texlive-full)
- R: R-base with all required packages
- Python: Python 3.13 with all requirements
- Quarto: Version 1.7.31
- Tools: Inkscape, Ghostscript, fonts
- Dependencies: All from
tools/dependencies/
Build Process
The container is built and tested via GitHub Actions:
# Trigger container build
gh workflow run build-container.yml
Usage
The container is used in the containerized build workflow:
container:
image: ghcr.io/harvard-edge/cs249r_book/quarto-build:latest
options: --user root
Testing
The container build includes 17 comprehensive tests:
- Quarto functionality
- Python packages (all from requirements.txt)
- R packages (all from install_packages.R)
- TeX Live and LaTeX engines
- Inkscape SVG to PDF conversion
- Ghostscript PDF compression
- Fonts and graphics libraries
- Quarto render test
- TikZ compilation test
- System resources check
- Network connectivity
- Book structure compatibility
- Quarto configuration files
- Dependencies files accessibility
- Quarto check (same as workflow)
- Actual build process simulation
- Memory and disk space verification
Registry
- Registry: GitHub Container Registry (ghcr.io)
- Image:
ghcr.io/harvard-edge/cs249r_book/quarto-build - Tags:
latest,main,dev, branch-specific tags - Size: ~2-3GB (includes TeX Live, R, Python packages)
Performance
- Traditional build: 45 minutes
- Containerized build: 5-10 minutes
- Improvement: 80-90% time reduction