Skip to content

Commit 296ea9e

Browse files
committed
install{,s}.yml: GHA testing pip install on EC2 GPU nodes
1 parent 7f5eaf6 commit 296ea9e

File tree

2 files changed

+78
-9
lines changed

2 files changed

+78
-9
lines changed

.github/workflows/install.yaml

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,54 @@
1-
name: pip install test
1+
name: "Test pip install"
22
on:
33
workflow_dispatch:
4+
inputs:
5+
mamba_version:
6+
description: "Mamba version to test"
7+
required: true
8+
type: string
9+
default: "2.2.5"
10+
python:
11+
description: "Python version to use"
12+
required: false
13+
type: string
14+
default: "3.11.13"
15+
workflow_call:
16+
inputs:
17+
mamba_version:
18+
description: "Mamba version to test"
19+
required: true
20+
type: string
21+
python:
22+
description: "Python version to use"
23+
required: false
24+
type: string
25+
default: "3.11.13"
26+
permissions:
27+
id-token: write
28+
contents: read
429
jobs:
5-
placeholder:
6-
runs-on: ubuntu-latest
30+
ec2:
31+
uses: Open-Athena/ec2-gha/.github/workflows/runner.yml@v2
32+
secrets: inherit
33+
with:
34+
ec2_instance_type: g4dn.xlarge
35+
ec2_image_id: ami-00096836009b16a22 # Deep Learning OSS Nvidia Driver AMI GPU PyTorch
36+
instance_name: "$repo/$name==${{ inputs.mamba_version }} (#$run_number)"
37+
install:
38+
name: Test mamba_ssm==${{ inputs.mamba_version }}
39+
needs: ec2
40+
runs-on: ${{ needs.ec2.outputs.id }}
741
steps:
8-
- run: echo "Placeholder workflow"
42+
- name: Setup Python environment
43+
run: |
44+
# Set up environment for GitHub Actions to use conda env
45+
echo "/opt/conda/envs/pytorch/bin" >> $GITHUB_PATH
46+
echo "CONDA_DEFAULT_ENV=pytorch" >> $GITHUB_ENV
47+
- name: Install and test mamba_ssm==${{ inputs.mamba_version }}
48+
run: |
49+
# Install mamba_ssm without build isolation to use existing torch from conda env
50+
# No need to reinstall torch since it's already in the conda environment
51+
pip install -v --no-build-isolation mamba_ssm==${{ inputs.mamba_version }}
52+
- name: Verify mamba_ssm installation
53+
run: |
54+
python -c 'import mamba_ssm; print(f"mamba_ssm {mamba_ssm.__version__} installed successfully")'

.github/workflows/installs.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
1-
name: pip install test - multiple versions
1+
name: "Test pip install - multiple versions"
22
on:
33
workflow_dispatch:
4+
inputs:
5+
python:
6+
description: "Python version to use"
7+
required: false
8+
type: string
9+
default: "3.11.13"
10+
permissions:
11+
id-token: write
12+
contents: read
413
jobs:
5-
placeholder:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- run: echo "Placeholder workflow"
14+
installs:
15+
name: Test mamba_ssm==${{ matrix.mamba_version }}
16+
strategy:
17+
matrix:
18+
include:
19+
# All versions support PyTorch 2.4, use AMI's PyTorch 2.4.1
20+
- { "mamba_version": "2.2.0" }
21+
- { "mamba_version": "2.2.1" }
22+
- { "mamba_version": "2.2.2" }
23+
- { "mamba_version": "2.2.3post2" }
24+
- { "mamba_version": "2.2.4" }
25+
- { "mamba_version": "2.2.5" }
26+
fail-fast: false
27+
uses: ./.github/workflows/install.yaml
28+
secrets: inherit
29+
with:
30+
mamba_version: ${{ matrix.mamba_version }}
31+
python: ${{ inputs.python }}

0 commit comments

Comments
 (0)