diff --git a/.github/actions/env/action.yml b/.github/actions/env/action.yml index 2a90a98..bd2ef8c 100644 --- a/.github/actions/env/action.yml +++ b/.github/actions/env/action.yml @@ -16,6 +16,12 @@ inputs: ref: default: ${{ github.sha }} + extra-deps: + description: "Dependencies to be installed manually before installing kornia." + default: "" + required: False + type: strig + runs: using: "composite" steps: @@ -32,12 +38,12 @@ runs: - if: ${{ contains(fromJson('["nightly"]'), inputs.pytorch-version ) }} name: Install PyTorch nightly shell: bash - run: pip install numpy --pre torch[dynamo] --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/cpu/ + run: pip install numpy --pre torch[dynamo] ${{ inputs.extra-deps }} --force-reinstall --extra-index-url https://download.pytorch.org/whl/nightly/cpu/ - if: ${{ contains(fromJson('["nightly"]'), inputs.pytorch-version ) == false}} name: Install pytorch shell: bash - run: pip install torch==${{ inputs.pytorch-version }} --index-url https://download.pytorch.org/whl/cpu + run: pip install torch==${{ inputs.pytorch-version }} ${{ inputs.extra-deps }} --index-url https://download.pytorch.org/whl/cpu - if: ${{ contains(fromJson('["1.9.1"]'), inputs.pytorch-version) }} name: Install accelerate for old torchs diff --git a/README.md b/README.md index 3db1f22..90770e1 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ Has the inputs: channel. - If the value passed is `nightly` the nightly version of pytorch with dynamo will be installed from pip. +- `extra-deps`: (string, default: `''`) will install alongside the pytorch these dependencies + before install kornia itself. #### example ```yaml