From d3ce7ebdc2bb8369b129f8351dd226f2d932bb71 Mon Sep 17 00:00:00 2001 From: Utku Ozdemir Date: Wed, 17 Jul 2024 10:56:55 +0200 Subject: [PATCH] test: test gpu runners over cirun.io Signed-off-by: Utku Ozdemir --- .cirun.yml | 15 +++++++++++++++ .github/workflows/build.yml | 38 +++++-------------------------------- 2 files changed, 20 insertions(+), 33 deletions(-) create mode 100644 .cirun.yml diff --git a/.cirun.yml b/.cirun.yml new file mode 100644 index 0000000..3635f49 --- /dev/null +++ b/.cirun.yml @@ -0,0 +1,15 @@ +runners: + - name: gpu-runner + cloud: gcp + gpu: nvidia-tesla-t4 + instance_type: n1-standard-1 + machine_image: c0-deeplearning-common-gpu-v20240708-debian-11-py310 + preemptible: true + region: + - europe-west2-b + - europe-west2-a + - europe-west4-c + - europe-west4-b + - europe-west4-a + labels: + - cirun-gpu-runner diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c3fb88..9c22ffe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,39 +30,11 @@ concurrency: jobs: build: - runs-on: ubuntu-22.04 + runs-on: "cirun-gpu-runner--${{ github.run_id }}" steps: - name: Checkout uses: actions/checkout@v4.1.7 - - name: Setup Go - uses: actions/setup-go@v5.0.2 - with: - go-version-file: go.mod - - name: Ensure go.mod is already tidied - run: go mod tidy && git diff --no-patch --exit-code - - name: Run linters - uses: golangci/golangci-lint-action@v6.0.1 - with: - # renovate: depName=golangci/golangci-lint datasource=github-releases - version: v1.59.1 - args: --timeout=3m0s - - name: Install richgo - # renovate: depName=kyoh86/richgo - run: go install github.com/kyoh86/richgo@v0.3.12 - - name: Run tests - run: richgo test -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -timeout 20m -v ./... - env: - RICHGO_FORCE_COLOR: 1 - - name: Send coverage - uses: codecov/codecov-action@v4.5.0 - with: - files: coverage.txt - token: ${{ secrets.CODECOV_TOKEN }} - - name: Build with Goreleaser - uses: goreleaser/goreleaser-action@v6.0.0 - with: - # renovate: depName=goreleaser/goreleaser datasource=github-releases - version: v2.1.0 - args: release --snapshot --skip=publish --clean - env: - PRIVATE_ACCESS_TOKEN: placeholder + - name: Install nvidia drivers + run: /opt/deeplearning/install-driver.sh + - name: Test nvidia-smi + run: nvidia-smi -L