feat: replace pip install with uv pip install in CI workflows (#9661)

* feat: replace pip install with uv pip install in CI workflows

* Installs uv within the virtual environment, ensuring isolation

* Replace pip install with uv in CI workflows for faster dependency installation

* Update action.yml

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
rahulsamant37 2024-10-18 04:45:05 +05:30 committed by GitHub
parent 8d848dd1e4
commit 88c8793276
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,11 @@ runs:
run: |
python -m pip install --upgrade virtualenv
python -m virtualenv venv
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# - uses: actions/cache@v4
# id: cache
# with:
@ -71,14 +76,14 @@ runs:
shell: bash
run: |
. ${{ env.VENV_ACTIVATE }}
python -m pip install -r test/requirements.txt
python -m pip install -r client/python/test/requirements.txt
uv pip install -r test/requirements.txt
uv pip install -r client/python/test/requirements.txt
- name: Install Gradio and Client Libraries Locally (Linux)
shell: bash
run: |
. ${{ env.VENV_ACTIVATE }}
python -m pip install -e client/python
python -m pip install -e ".[oauth]"
uv pip install -e client/python
uv pip install -e ".[oauth]"
- name: install-frontend
uses: "gradio-app/gradio/.github/actions/install-frontend-deps@main"
with:
@ -89,4 +94,4 @@ runs:
if: inputs.os == 'ubuntu-latest'
run: |
. ${{ env.VENV_ACTIVATE }}
pip install boto3 && python js/_website/generate_jsons/generate.py
uv pip install boto3 && python js/_website/generate_jsons/generate.py