File size: 604 Bytes
6a326d7 1d26c54 6a326d7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/bin/bash
set -euo pipefail
cd "$(dirname "$0")"
module load Miniconda3
conda create -y --override-channels -c conda-forge -p "$PWD/.conda" python=3.12 pip
source "$(conda info --base)/etc/profile.d/conda.sh"
conda activate "$PWD/.conda"
python -m pip install torch --index-url https://download.pytorch.org/whl/cu126
python -m pip install 'transformers==5.22.2' accelerate huggingface_hub safetensors
python -m unittest discover -s tests
python -m pip freeze > environment-resolved.txt
python -c 'import torch; assert torch.cuda.is_available(); print(torch.__version__, torch.cuda.get_device_name(0))'
|