mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-07-17 18:33:15 -05:00
## Repository Organization - Move scripts from bin/ to scripts/ directory - activate-tinytorch: Environment activation script - generate_module_metadata.py: Module metadata generator - generate_student_notebooks.py: Student notebook generator - tito: TinyTorch CLI tool ## Build System - Add site/build.sh: Jupyter Book 1.x build automation script - Auto-detects project root or site directory - Activates virtual environment if available - Handles clean builds with proper error handling ## Documentation - Add docs/history/ for migration documentation - ROLLBACK_TO_JB1.md: Jupyter Book 1.x rollback documentation - MIGRATION_TO_V2.md: Jupyter Book 2.0 migration attempt notes ## Infrastructure Updates - Update all site/modules/*_ABOUT.md symlinks: modules/ → src/ - Update all src/*/ABOUT.md symlinks: modules/ → src/ - Update .envrc: Reflect new scripts/ directory structure - Update pyproject.toml: Add build system dependencies This commit completes the src-modules separation restructuring and adds necessary tooling for the new repository layout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Tiny🔥Torch Environment Activation & Setup
|
|
|
|
# Allow users to pass a path to existing virtual env
|
|
VENV_PATH=${1:-".venv"}
|
|
export VENV_PATH
|
|
|
|
# Check if virtual environment exists, create if not
|
|
if [ ! -d "$VENV_PATH" ]; then
|
|
echo "🆕 First time setup - creating environment..."
|
|
python3 -m venv "$VENV_PATH" || {
|
|
echo "❌ Failed to create virtual environment"
|
|
exit 1
|
|
}
|
|
echo "📦 Installing dependencies..."
|
|
.venv/bin/pip install -r requirements.txt || {
|
|
echo "❌ Failed to install dependencies"
|
|
exit 1
|
|
}
|
|
echo "✅ Environment created!"
|
|
fi
|
|
|
|
echo "🔥 Activating Tiny🔥Torch environment..."
|
|
source "$VENV_PATH/bin/activate"
|
|
|
|
# Create tito alias for convenience
|
|
alias tito="python3 bin/tito"
|
|
|
|
echo "✅ Ready to build ML systems!"
|
|
echo "💡 Quick commands:"
|
|
echo " tito system info - Check system status"
|
|
echo " tito module test - Run tests"
|
|
echo " tito system doctor - Diagnose issues"
|
|
echo " tito system jupyter - Start Jupyter for interactive development"
|