From 60eb979527220f8855ed55bd32ab3781a168aace Mon Sep 17 00:00:00 2001 From: greg pereira Date: Sun, 23 Jun 2024 16:51:49 -0700 Subject: [PATCH] allowing pip to install requirements Signed-off-by: greg pereira --- .github/workflows/model_servers.yaml | 12 +++++++----- .../src/requirements-unlocked.txt | 3 ++- .../object_detection_python/src/requirements.txt | 4 +++- models/Makefile | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/model_servers.yaml b/.github/workflows/model_servers.yaml index c3885f95..517d6f96 100644 --- a/.github/workflows/model_servers.yaml +++ b/.github/workflows/model_servers.yaml @@ -6,12 +6,14 @@ on: - main paths: - 'model_servers/**' + - 'models/Makefile' - .github/workflows/model_servers.yaml push: branches: - main paths: - 'model_servers/**' + - 'models/Makefile' - .github/workflows/model_servers.yaml workflow_dispatch: @@ -83,6 +85,11 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static + + - name: Set up Python + uses: actions/setup-python@v5.1.0 + with: + python-version: '3.11' - name: Build Image id: build_image @@ -98,11 +105,6 @@ jobs: working-directory: ./models run: make download-model-${{ matrix.model }} - - name: Set up Python - uses: actions/setup-python@v5.1.0 - with: - python-version: '3.11' - - name: Install python dependencies working-directory: ./model_servers/${{ matrix.directory }}/ run: make install diff --git a/model_servers/object_detection_python/src/requirements-unlocked.txt b/model_servers/object_detection_python/src/requirements-unlocked.txt index e80624c7..7b2698d1 100644 --- a/model_servers/object_detection_python/src/requirements-unlocked.txt +++ b/model_servers/object_detection_python/src/requirements-unlocked.txt @@ -4,4 +4,5 @@ pydantic requests transformers torch -uvicorn \ No newline at end of file +uvicorn +timm diff --git a/model_servers/object_detection_python/src/requirements.txt b/model_servers/object_detection_python/src/requirements.txt index 7b4b25d4..20414450 100644 --- a/model_servers/object_detection_python/src/requirements.txt +++ b/model_servers/object_detection_python/src/requirements.txt @@ -7,7 +7,7 @@ dnspython==2.6.1 email_validator==2.2.0 fastapi==0.111.0 fastapi-cli==0.0.4 -filelock==3.15.3 +filelock==3.15.4 fsspec==2024.6.0 h11==0.14.0 httpcore==1.0.5 @@ -39,8 +39,10 @@ shellingham==1.5.4 sniffio==1.3.1 starlette==0.37.2 sympy==1.12.1 +timm==1.0.7 tokenizers==0.19.1 torch==2.3.1 +torchvision==0.18.1 tqdm==4.66.4 transformers==4.41.2 typer==0.12.3 diff --git a/models/Makefile b/models/Makefile index ab817db5..ca9eaeb5 100644 --- a/models/Makefile +++ b/models/Makefile @@ -40,7 +40,7 @@ download-model-mistral-code: .PHONY: download-model-facebook-detr-resnet-101 download-model-facebook-detr-resnet-101: - pip install -r ../convert_models/requirements.txt + python3 -m pip install -r ../convert_models/requirements.txt cd ../convert_models/ && \ python3 download_huggingface.py -m facebook/detr-resnet-101 cp -r ../convert_models/converted_models/facebook ./