Skip to content

Commit 532518b

Browse files
committed
Add workflow file to run simple cupy script with IRIS GPU runner
1 parent 0b25ea3 commit 532518b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/simple_cupy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Simple cupy script on IRIS
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
iris-gpu:
10+
runs-on: iris-gpu
11+
container:
12+
image: nvidia/cuda:12.6.3-devel-ubi8
13+
env:
14+
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
15+
16+
defaults:
17+
run:
18+
shell: bash -l {0}
19+
20+
steps:
21+
- name: Checkout repository code
22+
uses: actions/checkout@v4
23+
24+
- name: Create conda environment
25+
uses: mamba-org/setup-micromamba@v1
26+
with:
27+
environment-name: simple-cupy
28+
create-args: >-
29+
cupy==12.3.0
30+
post-cleanup: 'all'
31+
init-shell: bash
32+
33+
- name: Run simple cupy script
34+
run: python simple-cupy-script.py

simple-cupy-script.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import cupy as cp
2+
3+
arr = cp.array([1, 2, 3])
4+
print(f"arr before: {arr}")
5+
arr += 1
6+
print(f"arr after: {arr}")

0 commit comments

Comments
 (0)