refactor: implement clean naming pattern and fix workflow error

🏗️ FOLDER NAMING: Standardize to build-quarto-* pattern
- docker/quarto-build-linux/ → docker/build-quarto-linux/
- docker/quarto-build-windows/ → docker/build-quarto-windows/
- Emphasizes these are BUILD instructions, not final products

🐳 CONTAINER NAMING: Clean quarto-* pattern
- quarto-build-linux → quarto-linux:latest
- quarto-build-windows → quarto-windows:latest
- Follows Docker Hub conventions (nginx:latest, not nginx-build:latest)

🔧 WORKFLOW FIX: Resolve build-manager-enhanced error
- Fixed 'steps.strategy.outputs.workflow' error (Line 280, Col 15)
- GitHub Actions doesn't support dynamic workflow paths with 'uses'
- Replaced with conditional steps using static workflow references
- Now uses proper container builds when available, falls back gracefully

📝 UPDATES:
- All workflow files: Updated paths and container names
- All Dockerfiles: Updated internal COPY paths
- All documentation: Updated references

This creates clear separation between build assets and built products
while fixing the workflow syntax error that prevented execution.
This commit is contained in:
Vijay Janapa Reddi
2025-08-07 13:13:34 -04:00
parent e8e4457af6
commit ccc7ed82bd
16 changed files with 53 additions and 38 deletions

View File

@@ -30,10 +30,10 @@ Containerized Linux Build (5-10 minutes):
## Files
### Core Files
- `docker/quarto-build-linux/Dockerfile` - Linux container definition with all dependencies
- `docker/quarto-build-linux/README.md` - Linux container documentation
- `docker/quarto-build-linux/.dockerignore` - Build exclusions
- `docker/quarto-build-windows/Dockerfile` - Windows container definition
- `docker/build-quarto-linux/Dockerfile` - Linux container definition with all dependencies
- `docker/build-quarto-linux/README.md` - Linux container documentation
- `docker/build-quarto-linux/.dockerignore` - Build exclusions
- `docker/build-quarto-windows/Dockerfile` - Windows container definition
- `.github/workflows/build-linux-container.yml` - Builds and pushes Linux container
- `.github/workflows/build-windows-container.yml` - Builds and pushes Windows container
- `.github/workflows/quarto-build-container.yml` - Containerized build workflow
@@ -65,7 +65,7 @@ gh workflow run quarto-build-container.yml --field os=ubuntu-latest --field form
### Container Information
- **Linux Registry**: `ghcr.io/harvard-edge/cs249r_book/quarto-build`
- **Windows Registry**: `ghcr.io/harvard-edge/cs249r_book/quarto-build-windows`
- **Windows Registry**: `ghcr.io/harvard-edge/cs249r_book/build-quarto-windows`
- **Tags**: `latest`, `main`, `dev`, branch-specific tags
- **Linux Size**: ~2-3GB (includes TeX Live, R, Python packages)
- **Windows Size**: ~4-5GB (includes Windows Server Core + dependencies)

View File

@@ -6,7 +6,7 @@ This document summarizes the comprehensive fixes applied to the Docker container
## Issues Fixed
### 1. Linux Container (docker/quarto-build-linux/Dockerfile)
### 1. Linux Container (docker/build-quarto-linux/Dockerfile)
**Problems Identified:**
- Incorrect dependency file paths after repository restructuring
@@ -24,7 +24,7 @@ This document summarizes the comprehensive fixes applied to the Docker container
- ✅ Fixed PATH environment variables for all tools
- ✅ Added proper error handling in shell loops
### 2. Windows Container (docker/quarto-build-windows/Dockerfile)
### 2. Windows Container (docker/build-quarto-windows/Dockerfile)
**Problems Identified:**
- Complex and error-prone PowerShell syntax
@@ -152,16 +152,16 @@ Converted from bash to PowerShell with proper Windows paths:
## Files Modified
### Container Definitions:
- `docker/quarto-build-linux/Dockerfile` - Complete rebuild with 11 optimized phases
- `docker/quarto-build-windows/Dockerfile` - Enhanced with PowerShell 7 and better error handling
- `docker/build-quarto-linux/Dockerfile` - Complete rebuild with 11 optimized phases
- `docker/build-quarto-windows/Dockerfile` - Enhanced with PowerShell 7 and better error handling
### Workflow Files:
- `.github/workflows/build-linux-container.yml` - Updated tests and platform specification
- `.github/workflows/build-windows-container.yml` - Converted to PowerShell commands throughout
### Documentation:
- `docker/quarto-build-linux/README.md` - Updated with new phase information
- `docker/quarto-build-windows/README.md` - Enhanced with Windows-specific details
- `docker/build-quarto-linux/README.md` - Updated with new phase information
- `docker/build-quarto-windows/README.md` - Enhanced with Windows-specific details
- `docs/CONTAINER_FIXES_2025.md` - This comprehensive summary
## Verification Steps

View File

@@ -94,8 +94,8 @@ gh workflow run quarto-build.yml \
The enhanced manager uses project-based naming:
- **Linux Container**: `ghcr.io/harvard-edge/cs249r_book/quarto-build-linux:latest`
- **Windows Container**: `ghcr.io/harvard-edge/cs249r_book/quarto-build-windows:latest`
- **Linux Container**: `ghcr.io/harvard-edge/cs249r_book/quarto-linux:latest`
- **Windows Container**: `ghcr.io/harvard-edge/cs249r_book/quarto-windows:latest`
This clearly identifies containers as belonging to the ML Systems book project and scales well for future projects.