Update McDevol_GPU.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: McDevol_GPU | |
on: [push] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install CUDA Toolkit | |
uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
cuda: '11.2.2' | |
method: 'network' | |
- name: Create and activate conda environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda | |
echo "$HOME/miniconda/bin" >> $GITHUB_PATH | |
source $HOME/miniconda/bin/activate | |
conda env create --file environment.yml --name mcdevol_env | |
conda activate mcdevol_env | |
- name: Install TensorFlow | |
run: | | |
pip install tensorflow-gpu==2.8.0 | |
- name: Verify CUDA and TensorFlow | |
run: | | |
conda activate mcdevol_env | |
python mcdevol/mcdevol.py -h | |
python -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.device_count());)" | |
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))" |