Skip to content

Commit

Permalink
try avoid extra device whell to macos
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnv1 committed Apr 14, 2024
1 parent d5031b0 commit a16d503
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/actions/env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
required: False
type: strig

env:
WHELL_DEVICE: '+cpu'

runs:
using: "composite"
steps:
Expand All @@ -43,6 +46,10 @@ runs:
shell: bash
run: pip install uv

- if: runner.os == 'macOS'
env:
WHELL_DEVICE: ''

- if: ${{ contains(fromJson('["nightly"]'), inputs.pytorch-version ) }}
name: Install PyTorch nightly
shell: bash
Expand All @@ -51,7 +58,7 @@ runs:
- if: ${{ contains(fromJson('["nightly"]'), inputs.pytorch-version ) == false}}
name: Install pytorch
shell: bash
run: uv pip install --system torch==${{ inputs.pytorch-version }}+cpu ${{ inputs.extra-deps }} --extra-index-url https://download.pytorch.org/whl/cpu
run: uv pip install --system torch==${{ inputs.pytorch-version }}${{ env.WHELL_DEVICE }} ${{ inputs.extra-deps }} --extra-index-url https://download.pytorch.org/whl/cpu

- if: ${{ contains(fromJson('["1.9.1"]'), inputs.pytorch-version) }}
name: Install accelerate for old torchs
Expand Down

0 comments on commit a16d503

Please sign in to comment.