Initial commit

This commit is contained in:
2025-11-14 18:46:03 +08:00
commit b85faf48cd
70 changed files with 57687 additions and 0 deletions

65
start.sh Executable file
View File

@@ -0,0 +1,65 @@
#!/bin/bash
# Startup script for SDF processing workflow
echo "🚀 Starting SDF Processing Workflow"
echo "===================================="
# Check if we're in a pixi environment
if [ -z "$PIXI_ENVIRONMENT_NAME" ]; then
echo "📦 Activating pixi environment..."
exec pixi run bash "$0" "$@"
exit $?
fi
echo "✅ Pixi environment activated: $PIXI_ENVIRONMENT_NAME"
# Test the environment
echo "🧪 Running environment test..."
python test_environment.py
if [ $? -eq 0 ]; then
echo ""
echo "🎯 Ready to start! Choose your next step:"
echo ""
echo "1. Start Jupyter Notebook (recommended):"
echo " jupyter notebook notebooks/ --ip=0.0.0.0 --port=8888 --no-browser"
echo ""
echo "2. Start Jupyter Lab:"
echo " jupyter lab notebooks/ --ip=0.0.0.0 --port=8888 --no-browser"
echo ""
echo "3. Run extraction script directly:"
echo " python -c \"import papermill as pm; pm.execute_notebook('notebooks/01_extract_sdf_files.ipynb', 'extracted_output.ipynb')\""
echo ""
echo "4. Open interactive shell:"
echo " pixi shell"
echo ""
read -p "Enter your choice (1-4) or press Enter to start Jupyter: " choice
case $choice in
1)
echo "📓 Starting Jupyter Notebook..."
jupyter notebook notebooks/ --ip=0.0.0.0 --port=8888 --no-browser
;;
2)
echo "📓 Starting Jupyter Lab..."
jupyter lab notebooks/ --ip=0.0.0.0 --port=8888 --no-browser
;;
3)
echo "🔄 Running extraction directly..."
pixi add papermill
python -c "import papermill as pm; pm.execute_notebook('notebooks/01_extract_sdf_files.ipynb', 'extracted_output.ipynb')"
;;
4)
echo "🐚 Opening interactive shell..."
bash
;;
*)
echo "📓 Starting Jupyter Notebook (default)..."
jupyter notebook notebooks/ --ip=0.0.0.0 --port=8888 --no-browser
;;
esac
else
echo "❌ Environment test failed. Please check the installation."
exit 1
fi