lockdrop-simulation/run_experiment.sh
Prathamesh Musale 652c69cbee Move lockdrop calculations to a module and add a experimentation notebook (#2)
- Refactor lockdrop calculations and other helper code from the simulation notebook to a python module
- Add a notebook for experimenting with lockdrop calculations
  - Add widget buttons to run calculations and export results
  - Add a script a to setup and run the notebook

Reviewed-on: #2
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2025-08-13 11:56:52 +00:00

50 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Lockdrop Allocation Experimentation Launcher
# This script automatically sets up the environment and launches the experimental notebook
set -e
echo "🚀 Starting Lockdrop Experimentation Environment..."
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed. Please install Python 3."
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating Python virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source venv/bin/activate
# Install/upgrade dependencies
echo "📚 Installing dependencies..."
pip install -q --upgrade pip
pip install -q -r requirements.txt
# Check if Jupyter is working
if ! command -v jupyter &> /dev/null; then
echo "❌ Jupyter installation failed. Please check your Python environment."
exit 1
fi
echo "✅ Environment ready!"
echo ""
echo "🎯 Opening lockdrop experimentation notebook..."
echo " The notebook will open in your default browser at http://localhost:8888"
echo ""
echo "📝 To stop the notebook server later, press Ctrl+C in this terminal"
echo ""
# Launch Jupyter notebook
jupyter notebook lockdrop-calculations.ipynb
echo ""
echo "👋 Experimentation session ended."