- Create a new conda environment:
conda create -n push_physics python=3.10
conda activate push_physics- Install PyTorch 2.4.0 with CUDA support:
# For CUDA 12.1
conda install pytorch=2.4.0 torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
# For CPU only
conda install pytorch=2.4.0 torchvision torchaudio cpuonly -c pytorch- Install other dependencies:
pip install -r requirements.txt- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows- Install PyTorch 2.4.0:
# For CUDA 12.1
pip install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# For CPU only
pip install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu- Install other dependencies:
pip install --upgrade pip
pip install -r requirements.txtRun the test script to verify your setup:
python -c "import torch; print(f'PyTorch version: {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}')"Expected output:
PyTorch version: 2.4.0
CUDA available: True # If CUDA is installed
- Install pre-commit hooks for code quality:
pip install pre-commit
pre-commit install- Setup JupyterLab for development:
jupyter lab- Ensure your NVIDIA drivers are up to date
- Required CUDA version: 12.1
- Use
nvidia-smito verify CUDA installation
- If you encounter package conflicts, try:
pip uninstall torch torchvision torchaudio # Remove existing PyTorch
pip install -r requirements.txt # Reinstall dependencies- For large datasets, you might need to adjust:
- Batch size in config/default.yaml
- Number of workers in DataLoader
- CUDA memory settings
- Python 3.10 or higher
- CUDA 11.8-12.2 (for GPU support)
- NVIDIA GPU with 4GB+ memory (recommended)
- 16GB RAM (minimum)
- 30GB free disk space