Skip to content

Build and Upload Models #1429

Build and Upload Models

Build and Upload Models #1429

Workflow file for this run

name: Build and Upload Models
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 1,13 * * *'
jobs:
# Label of the container job
build-and-upload:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Deploy bioengine-model-runner
uses: jakejarvis/s3-sync-action@master
if: github.ref == 'refs/heads/main'
env:
AWS_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
AWS_S3_BUCKET: model-repository
AWS_ACCESS_KEY_ID: ${{ secrets.S3_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: './src/bioengine-model-runner' # optional: defaults to entire repository
DEST_DIR: "bioengine-model-runner"
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy tqdm requests boto3 ruamel.yaml jinja2 pytest pytest-asyncio imjoy-rpc
- name: Convert models
run: python scripts/export_model_to_triton.py --download-weights --upload --skip-exists --remove-after-upload --endpoint-url=${{ secrets.S3_ENDPOINT }} --access-key-id=${{ secrets.S3_KEY }} --secret-access-key=${{ secrets.S3_SECRET }} --bucket=model-repository --prefix=
- name: Deploy model repository manifest to gh-pages 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: dist
- name: Test Triton models
if: github.ref == 'refs/heads/main'
run: python scripts/test-triton-models.py