Skip to content

Commit

Permalink
Try to run on a node.
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinds committed Jul 3, 2023
1 parent 5993987 commit b83c0c8
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/guide-notebooks-slurm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Guide Notebooks Regression
run-name: Guide Notebooks Regression
on: [push]
jobs:
start-node-runner:
runs-on: self-hosted, nobrainer-self-hosted-ci
outputs:
label: ${{ steps.srun.node_name }}
steps:
- name: sbatch
run: |
cat<<EOF > start_node_runner.sh
#!/bin/bash
#SBATCH -t 10
#SBATCH --mem=16G
#SBATCH -p gablab
set -ex
cd ${HOME}/actions-runner
./run.sh
EOF
jobid=$(sbatch start_node_runner.sh | cut -d ' ' -f 4)
while [ 1 ]; do
node=$(squeue --noheader -j ${jobid} -o "%N")
if [ -z ${node} ]; then
sleep 1;
else
break;
fi
done

guide-notebooks-regression:
needs: start-node-runner
runs-on: self-hosted, nobrainer-self-hosted-ci-runner
steps:
- run: echo "automatically triggered by a ${{ github.event_name }} event"
- run: echo "running on a ${{ runner.os }} server hosted by github"
- name: clone
uses: actions/checkout@v3
- name: install
run: |
cd ${{ github.workspace }}
python -m venv env
source env/bin/activate
pip install --upgrade pip
pip install jupyter
pip install -e .
nobrainer info
- name: run
run: |
for notebook in $(ls guide/[0-9][0-9]-*.ipynb); do
singularity exec \
--nv -B /om \
${HOME}/img/tensorflow_latest-gpu.sif \
./run.sh \
jupyter nbconvert \
--execute ${notebook} \
--to markdown \
--stdout
done
1 change: 1 addition & 0 deletions .github/workflows/guide-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ run-name: Guide Notebooks Regression
on: [push]
jobs:
guide-notebooks-regression:
if: ${{ false }}
runs-on: self-hosted
steps:
- run: echo "automatically triggered by a ${{ github.event_name }} event"
Expand Down

0 comments on commit b83c0c8

Please sign in to comment.