Skip to content

Commit

Permalink
add gpu test (#56)
Browse files Browse the repository at this point in the history
* add gpu test

* use RUNNER to set ip

* request gpu id

* add dependabot.yml
  • Loading branch information
CSY-ModelCloud authored Dec 4, 2024
1 parent 6bcc9a3 commit fbb2831
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
groups:
github-actions:
patterns:
- "*"
29 changes: 26 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
repository_dispatch:
workflow_dispatch:

env:
CUDA_DEVICE_ORDER: PCI_BUS_ID
RUNNER: 10.0.14.248

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -33,9 +37,7 @@ jobs:

- name: test cpu
if: always()
run: |
echo "${{ matrix.os }}"
python tests/cpu.py
run: python tests/cpu.py

freebsd:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -68,3 +70,24 @@ jobs:
source venv/bin/activate
pip install .
python tests/os.py
gpu:
runs-on: self-hosted
container:
image: ${RUNNER}:5000/modelcloud/gptqmodel:compiler_cuda124-torch2.5.1-python311
steps:
- uses: actions/checkout@v4

- name: install
run: pip install .

- name: test os
run: python tests/os.py

- name: Find suitable GPU
run: |
gpu_id=$(curl -s "http://${{ needs.check-vm.outputs.ip }}/gpu/get?id=${{ github.run_id }}&timestamp=$(date +%s%3N)&force=1")
echo "CUDA_VISIBLE_DEVICES=$gpu_id" >> $GITHUB_ENV
- name: test gpu
if: always()
run: python tests/cpu.py

0 comments on commit fbb2831

Please sign in to comment.