action.yml 996 字节
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
M
Michael Wyatt 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
        pip install --upgrade pip
        python -m pip install -U virtualenv
      shell: bash
    - id: create-venv
      run: |
        python -m venv unit-test-venv
        source ./unit-test-venv/bin/activate
        pip install --upgrade pip
        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
          echo "JobID: ${AISC_NODE_INSTANCE_ID}"
        fi
        if command -v nvidia-smi; then
          nvidia-smi
          which nvcc
          nvcc --version
        elif command -c rocm-smi; then
          rocm-smi --showhw
          which hipcc
          hipcc --version
        fi
      shell: bash