mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-03-12 00:03:35 -05:00
Introduces a command-line interface (CLI) named 'tito' to streamline project setup, testing, and information retrieval. Includes a setup script to automate virtual environment creation and dependency installation. Improves the user experience by providing clear instructions and status indicators within the CLI.
30 lines
878 B
Bash
Executable File
30 lines
878 B
Bash
Executable File
#!/bin/bash
|
|
# TinyTorch Environment Activation & Setup
|
|
|
|
# Check if virtual environment exists, create if not
|
|
if [ ! -d "tinytorch-env" ]; then
|
|
echo "🆕 First time setup - creating environment..."
|
|
python3 -m venv tinytorch-env || {
|
|
echo "❌ Failed to create virtual environment"
|
|
exit 1
|
|
}
|
|
echo "📦 Installing dependencies..."
|
|
tinytorch-env/bin/pip install -r requirements.txt || {
|
|
echo "❌ Failed to install dependencies"
|
|
exit 1
|
|
}
|
|
echo "✅ Environment created!"
|
|
fi
|
|
|
|
echo "🔥 Activating TinyTorch environment..."
|
|
source tinytorch-env/bin/activate
|
|
|
|
# Create tito alias for convenience
|
|
alias tito="python3 bin/tito.py"
|
|
|
|
echo "✅ Ready to build ML systems!"
|
|
echo "💡 Quick commands:"
|
|
echo " tito info - Check system status"
|
|
echo " tito test - Run tests"
|
|
echo " tito doctor - Diagnose issues"
|