mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-28 11:33:44 -05:00
Updates the project to use `.venv` as the standard virtual environment directory. This change: - Updates `.gitignore` to ignore `.venv/`. - Modifies the activation script to create and activate `.venv`. - Adjusts the `tito.py` script to check for `.venv`'s existence and activation. - Updates documentation and setup scripts to reflect the new virtual environment naming convention. This change streamlines environment management and aligns with common Python practices.
31 lines
918 B
Bash
Executable File
31 lines
918 B
Bash
Executable File
#!/bin/bash
|
|
# TinyTorch Environment Activation & Setup
|
|
|
|
# Check if virtual environment exists, create if not
|
|
if [ ! -d ".venv" ]; then
|
|
echo "🆕 First time setup - creating environment..."
|
|
python3 -m venv .venv || {
|
|
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 TinyTorch environment..."
|
|
source .venv/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"
|
|
echo " jupyter notebook - Start Jupyter for interactive development"
|