Skip to content

Commit

Permalink
Move gpu conf fix
Browse files Browse the repository at this point in the history
  • Loading branch information
endast committed May 17, 2024
1 parent 4c2448a commit 81e545e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/run-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
name:
required: true
type: string
no_gpu:
required: false
type: boolean
default: false

jobs:
Run-Pipeline:
runs-on: ubuntu-latest
Expand All @@ -34,6 +39,11 @@ jobs:
if: inputs.prerun_cmd
run: ${{inputs.prerun_cmd}}
shell: bash -el {0}
- name: Set to 0 Gpu in conf
if: inputs.no_gpu
# There are no GPUs on the gh worker, so we can disable it in the config
run: "sed -i 's/gpus: 1/gpus: 0/' ./example/config.yaml"
shell: bash -el {0}
- name: ${{inputs.name}}
run: ${{inputs.pipeline_cmd}}
shell: micromamba-shell {0}
3 changes: 1 addition & 2 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:
with:
environment_file: ./deeprvat_env_no_gpu.yml
name: Run run_training pipeline
# There are no GPUs on the gh worker, so we disable it in the config
prerun_cmd: "sed -i 's/gpus: 1/gpus: 0/' ./example/config.yaml"
no_gpu: true
pipeline_cmd: |
python -m snakemake -j 2 --directory ./example \
--snakefile ./pipelines/run_training.snakefile --show-failed-logs -F

0 comments on commit 81e545e

Please sign in to comment.