Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 3 additions & 73 deletions .github/workflows/build_triton_and_ft.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
name: Build Triton Server and FasterTransformers
name: Build Triton Server

on:
workflow_dispatch:
inputs:
triton:
description: 'triton branch version'
required: true
default: 'r23.04'
fastertransformer:
description: 'fastertransformer branch/tag version'
required: true
default: 'main'
build_triton_only:
description: 'whether to just build triton library'
required: false
type: boolean
default: false
is_llama_build:
description: 'whether to build custom llama source'
required: false
type: boolean
default: false
default: 'r23.10'

jobs:
build-triton:
Expand All @@ -38,6 +24,7 @@ jobs:
- name: Build Triton Binary
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
run: |
pip3 install requests
python3 build.py --enable-logging --enable-metrics --enable-stats --enable-cpu-metrics --enable-gpu --endpoint http
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
Expand All @@ -50,60 +37,3 @@ jobs:
aws s3 cp build/install/lib/libtritonserver.so s3://djl-ai/publish/tritonserver/${{ github.event.inputs.triton }}/
aws s3 cp build/install/bin/tritonserver s3://djl-ai/publish/tritonserver/${{ github.event.inputs.triton }}/
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/tritonserver/${{ github.event.inputs.triton }}/*"

create-runner:
if: ${{ github.repository == 'deepjavalibrary/djl' && ! github.event.inputs.build_triton_only }}
runs-on: [ self-hosted, scheduler ]
steps:
- name: Create new CPU instance
id: create_cpu
run: |
cd /home/ubuntu/djl_benchmark_script/scripts
token=$( curl -X POST -H "Authorization: token ${{ secrets.ACTION_RUNNER_PERSONAL_TOKEN }}" \
https://api.github.com/repos/deepjavalibrary/djl/actions/runners/registration-token \
--fail \
| jq '.token' | tr -d '"' )
./start_instance.sh action_cpu $token djl
outputs:
cpu_instance_id: ${{ steps.create_cpu.outputs.action_cpu_instance_id }}


build-fastertransformer:
if: ${{ github.repository == 'deepjavalibrary/djl' }}
runs-on: [ self-hosted, cpu ]
container: deepjavalibrary/djl-serving:fastertransformer-nightly
timeout-minutes: 60
needs: create-runner
steps:
- uses: actions/checkout@v3
- name: Build FasterTransformers
run: |
tools/scripts/build_ft_deps.sh ${{ github.event.inputs.fastertransformer }} ${{ github.event.inputs.triton }} ${{ github.event.inputs.is_llama_build }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
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
if: github.event.inputs.is_llama_build == 'false'
run: |
aws s3 sync /tmp/binaries/ s3://djl-ai/publish/fastertransformer/${{ github.event.inputs.fastertransformer }}/
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/fastertransformer/${{ github.event.inputs.fastertransformer }}/*"
- name: Copy files for llama build to S3 with AWS CLI
if: github.event.inputs.is_llama_build == 'true'
run: |
echo "pushing binaries to ft/llama"
aws s3 sync /tmp/binaries/ s3://djl-ai/publish/fastertransformer/llama/
aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/fastertransformer-llama/${{ github.event.inputs.fastertransformer }}/*"

stop-runner:
if: ${{ github.repository == 'deepjavalibrary/djl' && always() }}
runs-on: [ self-hosted, scheduler ]
needs: [ create-runner, build-fastertransformer]
steps:
- name: Stop all instances
run: |
cd /home/ubuntu/djl_benchmark_script/scripts
instance_id=${{ needs.create-runner.outputs.cpu_instance_id }}
./stop_instance.sh $instance_id
49 changes: 0 additions & 49 deletions tools/scripts/build_ft_deps.sh

This file was deleted.