action.yml 1.1 KB
Newer Older
M
Michael Wyatt 已提交
1 2 3 4 5 6 7 8
name: Create Virtual Environment

runs:
  using: "composite"
  steps:
    - id: update-env
      run: |
        sudo apt-get update && sudo apt-get -y upgrade
9
        sudo apt-get install -y libaio-dev
10 11
        python -m pip install --user --upgrade pip
        python -m pip install --user --upgrade virtualenv
M
Michael Wyatt 已提交
12 13 14 15 16
      shell: bash
    - id: create-venv
      run: |
        python -m venv unit-test-venv
        source ./unit-test-venv/bin/activate
17
        python -m pip install --upgrade pip
M
Michael Wyatt 已提交
18 19 20 21 22 23 24
        echo PATH=$PATH >> $GITHUB_ENV # Make it so venv is inherited for other steps
      shell: bash
    - id: print-env
      run: |
        which python
        python --version
        if [[ -z "${AISC_NODE_INSTANCE_ID}" ]]; then
25 26
          echo "Not on self-hosted node"
        else
M
Michael Wyatt 已提交
27 28 29 30 31 32
          echo "JobID: ${AISC_NODE_INSTANCE_ID}"
        fi
        if command -v nvidia-smi; then
          nvidia-smi
          which nvcc
          nvcc --version
33
        elif command -v rocm-smi; then
M
Michael Wyatt 已提交
34 35 36 37 38
          rocm-smi --showhw
          which hipcc
          hipcc --version
        fi
      shell: bash