feat: Update environment.yml with PyTorch and add installation guide
- environment.yml: Added PyTorch with CUDA 12.1, PyG (torch-geometric), and TensorBoard for neural network training - INSTALL_INSTRUCTIONS.md: Step-by-step guide for installing Miniconda and setting up the Atomizer environment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
63
INSTALL_INSTRUCTIONS.md
Normal file
63
INSTALL_INSTRUCTIONS.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Atomizer Installation Guide
|
||||
|
||||
## Step 1: Install Miniconda (Recommended)
|
||||
|
||||
1. Download Miniconda from: https://docs.conda.io/en/latest/miniconda.html
|
||||
- Choose: **Miniconda3 Windows 64-bit**
|
||||
|
||||
2. Run the installer:
|
||||
- Check "Add Miniconda3 to my PATH environment variable"
|
||||
- Check "Register Miniconda3 as my default Python"
|
||||
|
||||
3. Restart your terminal/VSCode after installation
|
||||
|
||||
## Step 2: Create Atomizer Environment
|
||||
|
||||
Open **Anaconda Prompt** (or any terminal after restart) and run:
|
||||
|
||||
```bash
|
||||
cd C:\Users\Antoine\Atomizer
|
||||
conda env create -f environment.yml
|
||||
conda activate atomizer
|
||||
```
|
||||
|
||||
## Step 3: Install PyTorch with GPU Support (Optional but Recommended)
|
||||
|
||||
If you have an NVIDIA GPU:
|
||||
|
||||
```bash
|
||||
conda activate atomizer
|
||||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
||||
pip install torch-geometric
|
||||
```
|
||||
|
||||
## Step 4: Verify Installation
|
||||
|
||||
```bash
|
||||
conda activate atomizer
|
||||
python -c "import torch; import optuna; import pyNastran; print('All imports OK!')"
|
||||
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
|
||||
```
|
||||
|
||||
## Step 5: Train Neural Network
|
||||
|
||||
```bash
|
||||
conda activate atomizer
|
||||
cd C:\Users\Antoine\Atomizer\atomizer-field
|
||||
python train_parametric.py --train_dir ../atomizer_field_training_data/bracket_stiffness_optimization_atomizerfield --epochs 100 --output_dir runs/bracket_model
|
||||
```
|
||||
|
||||
## Quick Commands Reference
|
||||
|
||||
```bash
|
||||
# Activate environment (do this every time you open a new terminal)
|
||||
conda activate atomizer
|
||||
|
||||
# Train neural network
|
||||
cd C:\Users\Antoine\Atomizer\atomizer-field
|
||||
python train_parametric.py --train_dir ../atomizer_field_training_data/bracket_stiffness_optimization_atomizerfield --epochs 100
|
||||
|
||||
# Run optimization with neural acceleration
|
||||
cd C:\Users\Antoine\Atomizer\studies\bracket_stiffness_optimization_atomizerfield
|
||||
python run_optimization.py --run --trials 100 --enable-nn
|
||||
```
|
||||
@@ -14,6 +14,8 @@
|
||||
name: atomizer
|
||||
channels:
|
||||
- pytorch
|
||||
- nvidia
|
||||
- pyg
|
||||
- conda-forge
|
||||
- defaults
|
||||
|
||||
@@ -41,7 +43,19 @@ dependencies:
|
||||
# FEA/Nastran Parsing
|
||||
# ============================================================================
|
||||
- h5py>=3.0.0
|
||||
- pip
|
||||
|
||||
# ============================================================================
|
||||
# Neural Network / AtomizerField
|
||||
# ============================================================================
|
||||
# PyTorch with CUDA support
|
||||
- pytorch>=2.0.0
|
||||
- pytorch-cuda=12.1
|
||||
|
||||
# PyTorch Geometric for Graph Neural Networks
|
||||
- pyg>=2.3.0
|
||||
|
||||
# TensorBoard for training visualization
|
||||
- tensorboard>=2.13.0
|
||||
|
||||
# ============================================================================
|
||||
# Web Framework (Dashboard/API)
|
||||
@@ -67,6 +81,7 @@ dependencies:
|
||||
# ============================================================================
|
||||
# pip-only packages (not available in conda)
|
||||
# ============================================================================
|
||||
- pip
|
||||
- pip:
|
||||
# Nastran file parser (numpy<2 constraint is handled above)
|
||||
- pyNastran>=1.4.0,<1.5.0
|
||||
@@ -79,11 +94,10 @@ dependencies:
|
||||
# ============================================================================
|
||||
#
|
||||
# 1. Verify installation:
|
||||
# python -c "import optuna; import pyNastran; print('All imports OK')"
|
||||
# python -c "import optuna; import pyNastran; import torch; print('All imports OK')"
|
||||
#
|
||||
# 2. For NX integration, ensure NX Python stubs are accessible:
|
||||
# 2. Check GPU:
|
||||
# python -c "import torch; print(f'CUDA: {torch.cuda.is_available()}')"
|
||||
#
|
||||
# 3. For NX integration, ensure NX Python stubs are accessible:
|
||||
# See config.py for NX_PYTHON_STUBS path
|
||||
#
|
||||
# 3. For AtomizerField neural surrogates, install PyTorch and torch-geometric separately:
|
||||
# conda install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia
|
||||
# pip install torch-geometric tensorboard
|
||||
|
||||
Reference in New Issue
Block a user