forked from deepjavalibrary/djl
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.43 KB
/
native_jni_s3_tensorrt.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
name: Native JNI S3 TensorRT
on:
workflow_dispatch:
jobs:
build-tensorrt-jni-linux:
runs-on: ubuntu-latest
container: deepjavalibrary/ubuntu18.04:tensorrt-cuda116
steps:
- name: Install Environment
run: pip3 install awscli --upgrade
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Release JNI prep
run: ./gradlew :engines:tensorrt:compileJNI
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Copy files to S3 with the AWS CLI
run: |
TRT_VERSION="$(awk -F '=' '/tensorrt/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)"
aws s3 sync engines/tensorrt/jnilib s3://djl-ai/publish/tensorrt/${TRT_VERSION}/jnilib
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/tensorrt/${TRT_VERSION}/jnilib*"