Skip to content

Move checkout after ubuntu package install #416

Move checkout after ubuntu package install

Move checkout after ubuntu package install #416

Workflow file for this run

name: gpu-ci
on:
workflow_dispatch:
push:
branches:
- main
- pull-request/*
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
gpu-ci:
runs-on: linux-amd64-gpu-p100-latest-1
strategy:
matrix:
image: ["nvcr.io/nvidia/tensorflow:23.06-tf2-py3"]
container:
image: ${{ matrix.image }}
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ubuntu packages
run: |
apt-get update -y
apt-get install -y lsb-release
- name: Install and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- uses: actions/cache@v3
with:
path: .tox
key: tox-${{ matrix.image }}-${{ hashFiles('requirements/*.txt') }}
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
- name: Run tests
run: |
if [ "${{ github.ref }}" != 'refs/heads/main' ]; then
extra_pytest_markers="and changed"
fi
merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
PYTEST_MARKERS="unit and not (examples or integration or notebook) $extra_pytest_markers" \
tox -e gpu
gpu-cu11:
runs-on: linux-amd64-gpu-p100-latest-1
container:
image: nvidia/cuda:11.8.0-devel-ubuntu22.04
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- name: Install Ubuntu packages
run: |
apt-get update -y
# libcudnn8 installed for tensorflow GPU support
apt-get install -y git lsb-release 'libcudnn8=*cuda11.8'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/cache@v3
with:
path: .tox
key: tox-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements/*.txt') }}
- name: Install and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
- name: Run tests
run: |
if [[ "${{ github.ref }}" != 'refs/heads/main' ]]; then
extra_pytest_markers="and changed"
fi
merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
RAPIDS_VERSION=23.04 MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
PYTEST_MARKERS="unit and not (examples or integration or notebook) $extra_pytest_markers" \
tox -e gpu-cu11
tests-examples:
runs-on: linux-amd64-gpu-p100-latest-1
container:
image: nvidia/cuda:11.8.0-devel-ubuntu22.04
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
steps:
- name: Install Ubuntu packages
run: |
apt-get update -y
# libcudnn8 installed for tensorflow GPU support
apt-get install -y git lsb-release 'libcudnn8=*cuda11.8'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.8
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/cache@v3
with:
path: .tox
key: tox-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements/*.txt') }}
- name: Install and upgrade python packages
run: |
python -m pip install --upgrade pip tox
- name: Get Branch name
id: get-branch-name
uses: NVIDIA-Merlin/.github/actions/branch-name@6f0539fba24f60da2aee63c5925bee7cee3206e3
- name: Run tests
run: |
if [ "${{ github.ref }}" != 'refs/heads/main' ]; then
extra_pytest_markers="and changed"
fi
merlin_branch="${{ steps.get-branch-name.outputs.branch }}"
RAPIDS_VERSION=23.04 MERLIN_BRANCH=$merlin_branch COMPARE_BRANCH=$merlin_branch \
PYTEST_MARKERS="(examples or notebook) $extra_pytest_markers" \
tox -e gpu-cu11