Skip to content

Commit

Permalink
Merge pull request #975 from anarkiwi/ts
Browse files Browse the repository at this point in the history
Move to iqtlabs/torchserve.
  • Loading branch information
anarkiwi authored Nov 17, 2023
2 parents df3dd4a + 977aa56 commit 10443c7
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 219 deletions.
102 changes: 0 additions & 102 deletions .github/workflows/docker-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,108 +6,6 @@ on:
tags: 'v*'

jobs:
buildx-torchserve:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Change for main
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push platforms
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.torchserve
platforms: linux/amd64,linux/arm64
push: true
tags: iqtlabs/gamutrf-torchserve:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
buildx-orin-torchserve:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Change for main
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push platforms
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.orin-torchserve
platforms: linux/arm64
push: true
tags: iqtlabs/gamutrf-orin-torchserve:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
buildx-cuda-torchserve:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Change for main
id: change_version
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "main" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi
- name: Set up qemu
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push platforms
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.cuda-torchserve
platforms: linux/amd64
push: true
tags: iqtlabs/gamutrf-cuda-torchserve:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
buildx-mqtt:
runs-on: ubuntu-latest
steps:
Expand Down
23 changes: 1 addition & 22 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
name: docker-test
on: [push, pull_request]
jobs:
test-orin-torchserve:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up qemu
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile.orin-torchserve
platforms: linux/arm64
push: false
test-gamutrf-torchserve-image:
test-gamutrf-torchserve:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: docker build
run: |
docker build -f docker/Dockerfile.torchserve . -t iqtlabs/gamutrf-torchserve:latest
./tests/test_torchserve.sh
test-gamutrf-extra-images:
runs-on: ubuntu-latest
Expand Down
14 changes: 0 additions & 14 deletions docker/Dockerfile.cuda-torchserve

This file was deleted.

20 changes: 0 additions & 20 deletions docker/Dockerfile.orin-torchserve

This file was deleted.

9 changes: 0 additions & 9 deletions docker/Dockerfile.torchserve

This file was deleted.

4 changes: 1 addition & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Description of the various files and their functions:
- Dockerfile.base -
- Dockerfile.mqtt -
- Dockerfile.vkfft -
- Dockerfile.torchserve -
- Dockerfile.cuda-torchserve -
- Dockerfile.airspyfm -

Docker compose
Expand All @@ -18,4 +16,4 @@ Docker compose
- specgram.yml -
- prometheus.yml -
- monitoring.yml -
- freespacer.ym -
- freespacer.yml -
2 changes: 1 addition & 1 deletion tests/test_torchserve.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ torch-model-archiver --force --model-name yolov8n --version 1.0 --serialized-fil
rm -rf model_store && mkdir model_store
mv yolov8n.mar model_store/
# TODO: --runtime nvidia is required for Orin
docker run -v $(pwd)/model_store:/model_store -p 8080:8080 --rm --name testts --entrypoint timeout -d iqtlabs/gamutrf-torchserve 180s /torchserve/torchserve-entrypoint.sh --models yolov8n=yolov8n.mar
docker run -v $(pwd)/model_store:/model_store -p 8080:8080 --rm --name testts --entrypoint timeout -d iqtlabs/torchserve 180s /torchserve/torchserve-entrypoint.sh --models yolov8n=yolov8n.mar
# TODO: use gamutRF test spectogram image
wget https://github.com/pytorch/serve/raw/master/examples/object_detector/yolo/yolov8/persons.jpg
wget -q --retry-connrefused --retry-on-host-error --body-file=persons.jpg --method=PUT -O- --header='Content-Type: image/jpg' http://127.0.0.1:8080/predictions/yolov8n | jq
2 changes: 1 addition & 1 deletion torchserve-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ networks:
services:
torchserve:
restart: always
image: iqtlabs/gamutrf-cuda-torchserve:latest
image: iqtlabs/cuda-torchserve:latest
networks:
- gamutrf
ports:
Expand Down
2 changes: 1 addition & 1 deletion torchserve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ networks:
services:
torchserve:
restart: always
image: iqtlabs/gamutrf-torchserve:latest
image: iqtlabs/torchserve:latest
networks:
- gamutrf
ports:
Expand Down
6 changes: 0 additions & 6 deletions torchserve/config.properties

This file was deleted.

23 changes: 0 additions & 23 deletions torchserve/install-orin-torchserve.sh

This file was deleted.

15 changes: 0 additions & 15 deletions torchserve/install-torchserve.sh

This file was deleted.

2 changes: 0 additions & 2 deletions torchserve/torchserve-entrypoint.sh

This file was deleted.

0 comments on commit 10443c7

Please sign in to comment.