Florence finetunes in workflows #1594
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test package install - inference-gpu[extras] | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
jobs: | |
call_is_mergeable: | |
uses: ./.github/workflows/is_mergeable.yml | |
secrets: inherit | |
build: | |
needs: call_is_mergeable | |
if: ${{ github.event_name != 'pull_request' || needs.call_is_mergeable.outputs.mergeable_state != 'not_clean' }} | |
runs-on: | |
labels: depot-ubuntu-22.04-8 | |
group: public-depot | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🐍 Set up Python 3.9 to create wheels | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: 🚧 Install GDAL OS library | |
run: sudo apt-get update && sudo apt-get install libgdal-dev | |
- name: 🛞 Create Wheels | |
run: | | |
make create_wheels | |
- name: 🐍 Set up Python ${{ matrix.python-version }} to test package install process | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 📦 Cache Python packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements/**') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }}- | |
- name: 📦 Installing `inference` package... | |
run: | | |
wheel_name=`ls ./dist/inference_gpu-*-py3-none-any.whl | head -n 1` | |
pip install "${wheel_name}[clip,gaze,grounding-dino,sam,waf,yolo-world,http,hosted,transformers]" | |
- name: 🧪 Testing package installation | |
working-directory: "/" | |
run: | | |
python -c "import os; import platform; print(f'Python version: {platform.python_version()}'); print(f'CWD: {os.getcwd()}'); from inference import get_model" | |
python -c "from inference.models.clip import Clip" | |
python -c "from inference.models.gaze import Gaze" | |
python -c "from inference.models.sam import SegmentAnything" | |
python -c "from inference.models.grounding_dino import GroundingDINO" | |
python -c "from inference.models.yolo_world import YOLOWorld" | |
python -c "from inference.models.florence2 import Florence2, LoRAFlorence2" |