Update Actions with uv installs (#17620)
This commit is contained in:
parent
e72f19f5cf
commit
121307a246
3 changed files with 16 additions and 21 deletions
29
.github/workflows/ci.yaml
vendored
29
.github/workflows/ci.yaml
vendored
|
|
@ -52,16 +52,15 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: "pip" # caching pip dependencies
|
- uses: astral-sh/setup-uv@v3
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
shell: bash # for Windows compatibility
|
shell: bash # for Windows compatibility
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip wheel
|
uv pip install --system . --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
pip install . --extra-index-url https://download.pytorch.org/whl/cpu
|
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
yolo checks
|
yolo checks
|
||||||
pip list
|
uv pip list
|
||||||
- name: Test HUB training
|
- name: Test HUB training
|
||||||
shell: python
|
shell: python
|
||||||
env:
|
env:
|
||||||
|
|
@ -111,6 +110,7 @@ jobs:
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
shell: bash # for Windows compatibility
|
shell: bash # for Windows compatibility
|
||||||
run: |
|
run: |
|
||||||
|
# Warnings: uv causes numpy errors during benchmarking
|
||||||
python -m pip install --upgrade pip wheel
|
python -m pip install --upgrade pip wheel
|
||||||
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
|
|
@ -172,12 +172,11 @@ jobs:
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: "pip" # caching pip dependencies
|
- uses: astral-sh/setup-uv@v3
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
shell: bash # for Windows compatibility
|
shell: bash # for Windows compatibility
|
||||||
run: |
|
run: |
|
||||||
# CoreML must be installed before export due to protobuf error from AutoInstall
|
# CoreML must be installed before export due to protobuf error from AutoInstall
|
||||||
python -m pip install --upgrade pip wheel
|
|
||||||
slow=""
|
slow=""
|
||||||
torch=""
|
torch=""
|
||||||
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
|
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
|
||||||
|
|
@ -186,11 +185,11 @@ jobs:
|
||||||
if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then
|
if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then
|
||||||
slow="pycocotools mlflow"
|
slow="pycocotools mlflow"
|
||||||
fi
|
fi
|
||||||
pip install -e ".[export]" $torch $slow pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu
|
uv pip install --system -e ".[export]" $torch $slow pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
yolo checks
|
yolo checks
|
||||||
pip list
|
uv pip list
|
||||||
- name: Pytest tests
|
- name: Pytest tests
|
||||||
shell: bash # for Windows compatibility
|
shell: bash # for Windows compatibility
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -213,12 +212,13 @@ jobs:
|
||||||
runs-on: gpu-latest
|
runs-on: gpu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: astral-sh/setup-uv@v3
|
||||||
- name: Install requirements
|
- name: Install requirements
|
||||||
run: pip install . pytest-cov
|
run: uv pip install --system . pytest-cov
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
run: |
|
run: |
|
||||||
yolo checks
|
yolo checks
|
||||||
pip list
|
uv pip list
|
||||||
- name: Pytest tests
|
- name: Pytest tests
|
||||||
run: |
|
run: |
|
||||||
slow=""
|
slow=""
|
||||||
|
|
@ -294,13 +294,8 @@ jobs:
|
||||||
channels: conda-forge,defaults
|
channels: conda-forge,defaults
|
||||||
channel-priority: true
|
channel-priority: true
|
||||||
activate-environment: anaconda-client-env
|
activate-environment: anaconda-client-env
|
||||||
- name: Cleanup toolcache
|
- name: Cleanup disk space
|
||||||
run: |
|
uses: ultralytics/actions/cleanup-disk@main
|
||||||
echo "Free space before deletion:"
|
|
||||||
df -h /
|
|
||||||
rm -rf /opt/hostedtoolcache
|
|
||||||
echo "Free space after deletion:"
|
|
||||||
df -h /
|
|
||||||
- name: Install Linux packages
|
- name: Install Linux packages
|
||||||
run: |
|
run: |
|
||||||
# Fix cv2 ImportError: 'libEGL.so.1: cannot open shared object file: No such file or directory'
|
# Fix cv2 ImportError: 'libEGL.so.1: cannot open shared object file: No such file or directory'
|
||||||
|
|
|
||||||
6
.github/workflows/docs.yml
vendored
6
.github/workflows/docs.yml
vendored
|
|
@ -29,7 +29,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
Docs:
|
Docs:
|
||||||
if: github.repository == 'ultralytics/ultralytics'
|
if: github.repository == 'ultralytics/ultralytics'
|
||||||
runs-on: macos-14
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Git config
|
- name: Git config
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -46,9 +46,9 @@ jobs:
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
cache: "pip" # caching pip dependencies
|
- uses: astral-sh/setup-uv@v3
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pip install ruff black tqdm minify-html mkdocs-material "mkdocstrings[python]" mkdocs-jupyter mkdocs-redirects mkdocs-ultralytics-plugin mkdocs-macros-plugin
|
run: uv pip install --system ruff black tqdm minify-html mkdocs-material "mkdocstrings[python]" mkdocs-jupyter mkdocs-redirects mkdocs-ultralytics-plugin mkdocs-macros-plugin
|
||||||
- name: Ruff fixes
|
- name: Ruff fixes
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: ruff check --fix --unsafe-fixes --select D --ignore=D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 .
|
run: ruff check --fix --unsafe-fixes --select D --ignore=D100,D104,D203,D205,D212,D213,D401,D406,D407,D413 .
|
||||||
|
|
|
||||||
2
.github/workflows/format.yml
vendored
2
.github/workflows/format.yml
vendored
|
|
@ -15,7 +15,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: macos-14
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Run Ultralytics Formatting
|
- name: Run Ultralytics Formatting
|
||||||
uses: ultralytics/actions@main
|
uses: ultralytics/actions@main
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue