-
Notifications
You must be signed in to change notification settings - Fork 144
45 lines (42 loc) · 1.59 KB
/
test_package_install_inference_with_extras.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test package install - inference[extras]
on:
pull_request:
branches: [main]
push:
branches: [ main ]
workflow_dispatch:
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
- name: 🐍 Set up Python 3.9 to create wheels
uses: actions/setup-python@v2
with:
python-version: "3.9"
- 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: 📦 Installing `inference` package...
run: |
wheel_name=`ls ./dist/inference-*-py3-none-any.whl | head -n 1`
pip install "${wheel_name}[clip,gaze,grounding-dino,sam,waf,yolo-world,http,hosted]"
- 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"