#!/bin/bash # ============================================================================== # Automated Environment Provisioning Script for Lab225 ResNet+LSTM Architecture # Based on UIIP NASB Virtual Environment Deployment Guidelines # ============================================================================== set -e echo "[1/5] Downloading and configuring Miniconda setup engine..." mkdir -p ~/miniconda3 wget https://anaconda.com -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh # Register Conda command tracking parameters into current terminal layer eval "$(/home/$USER/miniconda3/bin/conda shell.bash hook)" echo "[2/5] Creating isolated virtual sandbox env using Python 3.12..." conda create --name lab225_env python=3.12 -y conda activate lab225_env echo "[3/5] Installing core PyTorch framework with CUDA runtime components..." pip install --upgrade pip pip install torch torchvision --index-url https://pytorch.org echo "[4/5] Mounting Hugging Face transformers stack and production vision libraries..." pip install transformers[torch] datasets huggingface_hub timm evaluate safetensors fastai pip install matplotlib scipy numpy opencv-python pillow scikit-learn scikit-image pandas ipython jupyter tqdm graphviz pip install nibabel pytest einops nltk albumentations echo "[5/5] Launching infrastructure validation..." if [ -f "predict.py" ]; then chmod +x predict.py echo "[SUCCESS] Core neural network architecture dependencies successfully loaded." echo "To execute automated inference evaluations, run the following terminal strings:" echo " conda activate lab225_env" echo " python predict.py --image data/14_4_154037.dcm_norm.png --top_p 0.1" else echo "[WARNING] Environment initialized, but evaluation CLI script 'predict.py' is missing." fi