Skip to content

Commit f8f0fa1

Browse files
abossardCopilot
andcommitted
Integrate notebook setup into setup.sh, fix start.sh
setup.sh: adds notebook venv + deps install after main setup. start.sh: --install-only flag for non-interactive use, fixed filename reference (00→01). Both work on bash + zsh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 85aceee commit f8f0fa1

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

notebooks/start.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ fi
7575

7676
echo ""
7777
echo "🚀 Launching Jupyter Lab..."
78-
echo " Open 00_introduction.ipynb to start the learning path"
78+
echo " Open 01_evaluation_and_tuning.ipynb to start the learning path"
7979
echo ""
80+
81+
# Support --install-only flag (used by setup.sh)
82+
if [ "${1:-}" = "--install-only" ]; then
83+
echo "✅ Install complete (--install-only mode)"
84+
exit 0
85+
fi
86+
8087
exec jupyter lab --notebook-dir="$SCRIPT_DIR"

setup.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,34 @@ fi
125125

126126
echo ""
127127
info "Setup complete"
128+
echo ""
129+
130+
echo "📓 Setting up DSPy Playground notebooks..."
131+
if [ -f "notebooks/requirements.txt" ]; then
132+
echo "Installing notebook dependencies into notebooks/.venv..."
133+
(cd notebooks && bash start.sh --install-only 2>/dev/null) || {
134+
# If --install-only isn't supported, just create venv + install deps
135+
if [ ! -d "notebooks/.venv" ]; then
136+
python3 -m venv notebooks/.venv
137+
fi
138+
notebooks/.venv/bin/pip install --quiet --upgrade pip
139+
notebooks/.venv/bin/pip install --quiet -r notebooks/requirements.txt
140+
}
141+
info "Notebook setup complete"
142+
else
143+
warn "notebooks/requirements.txt not found, skipping notebook setup"
144+
fi
145+
128146
echo ""
129147
echo "🚀 Next steps:"
130148
echo ""
131-
echo "Option 1 - Use the start script (easiest):"
149+
echo "Option 1 - Start the web app:"
132150
echo " ./start-dev.sh"
133151
echo ""
134-
echo "Option 2 - Run manually in separate terminals:"
152+
echo "Option 2 - Start the DSPy Playground notebooks:"
153+
echo " cd notebooks && ./start.sh"
154+
echo ""
155+
echo "Option 3 - Run manually in separate terminals:"
135156
echo " Terminal 1: source .venv/bin/activate && cd backend && python app.py"
136157
echo " Terminal 2: cd frontend && npm run dev"
137158
echo ""

0 commit comments

Comments
 (0)