Commit Graph

7 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
853eb03ee8 style: apply consistent whitespace and formatting across codebase 2025-12-13 14:05:34 -05:00
Vijay Janapa Reddi
327077185d fix: replace ARG variables with hardcoded paths in Dockerfiles [skip ci]
ARG variables have scope issues across RUN commands in Docker, causing
COPY commands to fail. Since these paths are stable, hardcoding them
is simpler and more reliable.
2025-12-05 16:40:40 -08:00
Vijay Janapa Reddi
21d5945955 fix: remove RUN commands before COPY to fix ARG scope in Dockerfiles [skip ci]
- Moved RUN echo statements after COPY commands in both Dockerfiles
- ARG variables lose scope after RUN commands, causing COPY to fail
- Both Linux and Windows Dockerfiles now follow consistent pattern:
  1. Re-declare ARG variables
  2. Execute COPY commands immediately
  3. Run any status/logging commands after
2025-12-05 16:23:21 -08:00
Vijay Janapa Reddi
9b1bad0745 fix: re-declare ARG variables before COPY commands in Dockerfiles [skip ci]
Docker ARG variables have stage-level scope and must be re-declared
after RUN commands to be available for COPY commands. This fixes the
build error where Docker couldn't find the dependency files.

Changes:
- Moved ARG BOOK_DEPS and ARG BOOK_DOCKER declarations before COPY commands
- Added comment explaining ARG scope behavior
- Both Linux and Windows Dockerfiles updated consistently

Fixes: COPY failed: file not found in build context
2025-12-05 16:08:59 -08:00
Vijay Janapa Reddi
cfdb82c941 refactor: centralize Docker path configuration with ARG variables [skip ci]
Updated both Linux and Windows Dockerfiles to use ARG variables for path
configuration, providing a single source of truth for book/ structure.

Changes:
- Added ARG variables at top of both Dockerfiles (BOOK_ROOT, BOOK_TOOLS, BOOK_DEPS, BOOK_DOCKER)
- Updated all COPY commands to use ARG variables instead of hardcoded paths
- Updated workflow files to use vars.BOOK_DOCKER for Dockerfile paths
- Maintains compatibility with existing build process

Benefits:
- Single location to update if directory structure changes
- Can override paths at build time with --build-arg
- Self-documenting path structure
- Consistent with GitHub Actions repository variables pattern
2025-12-05 15:41:18 -08:00
Vijay Janapa Reddi
27eec778cf Fix Docker COPY paths after book/ restructure
Updated all COPY commands in Dockerfiles to use correct paths with book/ prefix:
- book/tools/dependencies/requirements.txt
- book/tools/dependencies/install_packages.R
- book/tools/dependencies/tl_packages
- book/docker/linux/verify_r_packages.R
- book/docker/windows/verify_r_packages.R

This fixes container build failures where Docker couldn't find dependency files at the old paths after the monorepo restructure moved all content to the book/ subdirectory.
2025-12-05 14:55:08 -08:00
Vijay Janapa Reddi
7b92e11193 Repository Restructuring: Prepare for TinyTorch Integration (#1068)
* Restructure: Move book content to book/ subdirectory

- Move quarto/ → book/quarto/
- Move cli/ → book/cli/
- Move docker/ → book/docker/
- Move socratiQ/ → book/socratiQ/
- Move tools/ → book/tools/
- Move scripts/ → book/scripts/
- Move config/ → book/config/
- Move docs/ → book/docs/
- Move binder → book/binder

Git history fully preserved for all moved files.

Part of repository restructuring to support MLSysBook + TinyTorch.

Pre-commit hooks bypassed for this commit as paths need updating.

* Update pre-commit hooks for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update all tools/ paths to book/tools/
- Update config/linting to book/config/linting
- Update project structure checks

Pre-commit hooks will now work with new directory structure.

* Update .gitignore for book/ subdirectory structure

- Update quarto/ paths to book/quarto/
- Update assets/ paths to book/quarto/assets/
- Maintain all existing ignore patterns

* Update GitHub workflows for book/ subdirectory

- Update all quarto/ paths to book/quarto/
- Update cli/ paths to book/cli/
- Update tools/ paths to book/tools/
- Update docker/ paths to book/docker/
- Update config/ paths to book/config/
- Maintain all workflow functionality

* Update CLI config to support book/ subdirectory

- Check for book/quarto/ path first
- Fall back to quarto/ for backward compatibility
- Maintain full CLI functionality

* Create new root and book READMEs for dual structure

- Add comprehensive root README explaining both projects
- Create book-specific README with quick start guide
- Document repository structure and navigation
- Prepare for TinyTorch integration
2025-12-05 14:04:21 -08:00