Skip to content

Commit

Permalink
GPU driver setup
Browse files Browse the repository at this point in the history
  • Loading branch information
naegelejd committed Nov 15, 2024
1 parent 95b5c51 commit 34efd32
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,48 +24,52 @@ jobs:
- 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: 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: 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: 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: 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: Setup tmate session
#uses: mxschmitt/action-tmate@v3

- name: GPU Check
shell: bash
run: |
#sudo apt update
sudo apt list --installed | grep nvidia
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
which nvidia-smi
sudo DEBIAN_FRONTEND=noninteractive apt install linux-headers-generic
sudo DEBIAN_FRONTEND=noninteractive apt install nvidia-dkms-535-server
sudo DEBIAN_FRONTEND=noninteractive apt install nvidia-driver-535-server
sudo modprobe nvidia
#which nvidia-smi
nvidia-smi

0 comments on commit 34efd32

Please sign in to comment.