Setting up 1ES Pool pipeline #11
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: Pingvin Build | |
on: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CONDA_CACHE_NUMBER: 1 | |
jobs: | |
build-and-test: | |
#runs-on: ["self-hosted", "1ES.Pool=biomedsigproc-github-NC6s_v3"] | |
runs-on: ["self-hosted", "1ES.Pool=biomedsigproc-gadgetron-NC6s_v3"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
# Do not specify environment file - see Cache step below | |
activate-environment: gadgetron | |
- name: Get Date | |
id: get-date | |
shell: bash | |
run: echo "YEARMONTH=$(date -u +'%Y%m')" >> $GITHUB_ENV | |
- name: Cache Conda Env | |
id: cache-conda | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CONDA }}/envs | |
key: | |
conda-${{ runner.os }}-${{ runner.arch }}-${{ | |
hashFiles('environment.yml') }}-${{ | |
env.YEARMONTH }}-${{ | |
env.CONDA_CACHE_NUMBER }} | |
- name: Update Environment | |
shell: bash -el {0} | |
run: conda env update -n gadgetron -f environment.yml | |
if: steps.cache-conda.outputs.cache-hit != 'true' | |
#- name: Setup tmate session | |
#uses: mxschmitt/action-tmate@v3 | |
- name: Install GPU driver | |
shell: bash | |
run: | | |
sudo apt update | |
#sudo apt list --installed | grep nvidia | |
#sudo apt --purge remove -y '*nvidia*' | |
#sudo apt autoremove -y | |
#sudo apt install -y ubuntu-drivers-common | |
##sudo ubuntu-drivers list --gpgpu | |
##sudo ubuntu-drivers install --gpgpu | |
#sudo ubuntu-drivers install --gpgpu nvidia:535-server | |
#sudo apt install -y nvidia-utils-535-server | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y linux-headers-generic | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y nvidia-dkms-535-server | |
sudo DEBIAN_FRONTEND=noninteractive apt install -y nvidia-driver-535-server | |
sudo modprobe nvidia | |
which nvidia-smi | |
- name: GPU check | |
shell: bash | |
run: nvidia-smi | |