Skip to content

Commit 020ea3d

Browse files
author
David Sitsky
committed
Merge branch 'master' into sits-fix-readme-to-latest-release
# Conflicts: # serving/docs/configurations_global.md
2 parents 94cbb73 + 3d49aeb commit 020ea3d

File tree

185 files changed

+7376
-3716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+7376
-3716
lines changed

.github/workflows/client-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
cd tests
6363
djl-serving -m test::Python=file://$PWD/python &> output.log &
6464
sleep 15
65-
python test_client.py
65+
python integration/test_client.py
6666
jobs
6767
kill %1
6868
- name: On failure step
@@ -109,7 +109,7 @@ jobs:
109109
./gradlew --stop
110110
./gradlew :serving:run --args="-m test::Python=file:$(pwd -W)/tests/python" &> output.log &
111111
sleep 30
112-
cd tests/ && python test_client.py
112+
cd tests/ && python integration/test_client.py
113113
- name: On failure step
114114
if: ${{ failure() }}
115115
shell: bash

.github/workflows/codeql-analysis-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
language: [ 'java' ]
31+
language: [ 'java', 'python' ]
3232
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3333
# Learn more:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

.github/workflows/continuous.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
python-version: '3.11'
3434
- name: install Python Dependencies
35-
run: pip3 install numpy yapf
35+
run: pip3 install "numpy<2" yapf
3636
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
3737
- uses: actions/cache@v4
3838
with:
@@ -46,7 +46,7 @@ jobs:
4646
- name: Build with Gradle
4747
run: ./gradlew --refresh-dependencies build :jacoco:testCodeCoverageReport --stacktrace
4848
- name: Upload test results
49-
uses: actions/upload-artifact@v3
49+
uses: actions/upload-artifact@v4
5050
if: always()
5151
with:
5252
name: serving-${{ matrix.os }}

.github/workflows/docker-nightly-publish.yml

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
description: 'release/nightly/temp, default is nightly'
88
required: true
99
default: 'nightly'
10+
workflow_call:
11+
inputs:
12+
mode:
13+
description: 'release/nightly/temp, default is nightly'
14+
type: string
15+
required: true
16+
default: 'nightly'
1017
schedule:
1118
- cron: '0 13 * * *'
1219

@@ -29,7 +36,7 @@ jobs:
2936
$AGENT_TOOLSDIRECTORY
3037
- uses: actions/checkout@v4
3138
- name: Login to Docker
32-
uses: docker/login-action@v2
39+
uses: docker/login-action@v3
3340
with:
3441
username: ${{ secrets.DOCKER_USERNAME }}
3542
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -52,43 +59,43 @@ jobs:
5259
path: ~/.gradle/caches
5360
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
5461
- name: Build serving package for nightly
55-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
62+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
5663
run: |
5764
./gradlew --refresh-dependencies :serving:dockerDeb -Psnapshot
5865
- name: Build and push nightly docker image
59-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
66+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
6067
working-directory: serving/docker
6168
run: |
62-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
69+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
6370
export NIGHTLY="-nightly"
64-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT ${{ matrix.arch }}
71+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT ${{ matrix.arch }}
6572
docker compose push ${{ matrix.arch }}
6673
- name: Build and push temp image
67-
if: ${{ github.event.inputs.mode == 'temp' }}
74+
if: ${{ inputs.mode == 'temp' }}
6875
working-directory: serving/docker
6976
run: |
70-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
77+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
7178
export NIGHTLY="-nightly"
72-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT ${{ matrix.arch }}
79+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT ${{ matrix.arch }}
7380
repo="185921645874.dkr.ecr.us-east-1.amazonaws.com/djl-ci-temp"
7481
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $repo
7582
tempTag="$repo:${{ matrix.arch }}-${GITHUB_SHA}"
7683
docker tag deepjavalibrary/djl-serving:${{ matrix.arch }}-nightly $tempTag
7784
docker push $tempTag
7885
- name: Build and push release docker image
79-
if: ${{ github.event.inputs.mode == 'release' }}
86+
if: ${{ inputs.mode == 'release' }}
8087
working-directory: serving/docker
8188
run: |
82-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
89+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
8390
export BASE_RELEASE_VERSION="${DJL_VERSION}"
8491
export RELEASE_VERSION="${DJL_VERSION}-"
8592
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION} ${{ matrix.arch }}
8693
docker compose push ${{ matrix.arch }}
8794
- name: Retag image for release
88-
if: ${{ matrix.arch == 'cpu' && github.event.inputs.mode == 'release' }}
95+
if: ${{ matrix.arch == 'cpu' && inputs.mode == 'release' }}
8996
working-directory: serving/docker
9097
run: |
91-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
98+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
9299
docker tag deepjavalibrary/djl-serving:${DJL_VERSION} deepjavalibrary/djl-serving:latest
93100
docker push deepjavalibrary/djl-serving:latest
94101
@@ -128,7 +135,7 @@ jobs:
128135
run: |
129136
yes | docker system prune -a --volumes
130137
- name: Login to Docker
131-
uses: docker/login-action@v2
138+
uses: docker/login-action@v3
132139
with:
133140
username: ${{ secrets.DOCKER_USERNAME }}
134141
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -151,34 +158,34 @@ jobs:
151158
path: ~/.gradle/caches
152159
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
153160
- name: Build serving package for nightly
154-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
161+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
155162
run: |
156163
./gradlew --refresh-dependencies :serving:dockerDeb -Psnapshot
157164
- name: Build and push nightly docker image
158-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
165+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
159166
working-directory: serving/docker
160167
run: |
161-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
168+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
162169
export NIGHTLY="-nightly"
163-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT aarch64
170+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT aarch64
164171
docker compose push aarch64
165172
- name: Build and push temp image
166-
if: ${{ github.event.inputs.mode == 'temp' }}
173+
if: ${{ inputs.mode == 'temp' }}
167174
working-directory: serving/docker
168175
run: |
169-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
176+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
170177
export NIGHTLY="-nightly"
171-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT aarch64
178+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT aarch64
172179
repo="185921645874.dkr.ecr.us-east-1.amazonaws.com/djl-ci-temp"
173180
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $repo
174181
tempTag="$repo:aarch64-${GITHUB_SHA}"
175182
docker tag deepjavalibrary/djl-serving:aarch64-nightly $tempTag
176183
docker push $tempTag
177184
- name: Build and push release docker image
178-
if: ${{ github.event.inputs.mode == 'release' }}
185+
if: ${{ inputs.mode == 'release' }}
179186
working-directory: serving/docker
180187
run: |
181-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
188+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
182189
export BASE_RELEASE_VERSION="${DJL_VERSION}"
183190
export RELEASE_VERSION="${DJL_VERSION}-"
184191
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION} aarch64
@@ -195,7 +202,7 @@ jobs:
195202
run: |
196203
yes | docker system prune -a --volumes
197204
- name: Login to Docker
198-
uses: docker/login-action@v2
205+
uses: docker/login-action@v3
199206
with:
200207
username: ${{ secrets.DOCKER_USERNAME }}
201208
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -218,34 +225,34 @@ jobs:
218225
path: ~/.gradle/caches
219226
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
220227
- name: Build serving package for nightly
221-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
228+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
222229
run: |
223230
./gradlew --refresh-dependencies :serving:dockerDeb -Psnapshot
224231
- name: Build and push nightly docker image
225-
if: ${{ github.event.inputs.mode == '' || github.event.inputs.mode == 'nightly' }}
232+
if: ${{ inputs.mode == '' || inputs.mode == 'nightly' }}
226233
working-directory: serving/docker
227234
run: |
228-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
235+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
229236
export NIGHTLY="-nightly"
230-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT lmi
237+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT lmi
231238
docker compose push lmi
232239
- name: Build and push temp image
233-
if: ${{ github.event.inputs.mode == 'temp' }}
240+
if: ${{ inputs.mode == 'temp' }}
234241
working-directory: serving/docker
235242
run: |
236-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
243+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
237244
export NIGHTLY="-nightly"
238-
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}~SNAPSHOT lmi
245+
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION}-SNAPSHOT lmi
239246
repo="185921645874.dkr.ecr.us-east-1.amazonaws.com/djl-ci-temp"
240247
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $repo
241248
tempTag="$repo:lmi-$GITHUB_SHA"
242249
docker tag deepjavalibrary/djl-serving:lmi-nightly $tempTag
243250
docker push $tempTag
244251
- name: Build and push release docker image
245-
if: ${{ github.event.inputs.mode == 'release' }}
252+
if: ${{ inputs.mode == 'release' }}
246253
working-directory: serving/docker
247254
run: |
248-
DJL_VERSION=$(cat ../../gradle.properties | awk -F '=' '/djl_version/ {print $2}')
255+
DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' ../../gradle/libs.versions.toml)
249256
export BASE_RELEASE_VERSION="${DJL_VERSION}"
250257
export RELEASE_VERSION="${DJL_VERSION}-"
251258
docker compose build --no-cache --build-arg djl_version=${DJL_VERSION} lmi

.github/workflows/instant_benchmark.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,12 @@ jobs:
129129
run: |
130130
python3 instant_benchmark.py --parse ${{ inputs.running_template }} \
131131
--container "${{ inputs.container }}"
132+
- uses: actions/upload-artifact@v4
133+
with:
134+
name: template-${{ inputs.instance }}
135+
path: tests/integration/template_tmp.json
132136
outputs:
133137
jobs: ${{ steps.generate_matrix.outputs.jobs }}
134-
template: ${{ steps.generate_matrix.outputs.template }}
135138

136139
benchmark_run:
137140
runs-on: [ self-hosted, "${{ inputs.instance }}" ]
@@ -177,10 +180,14 @@ jobs:
177180
uses: aws-actions/amazon-ecr-login@v2
178181
with:
179182
registries: "125045733377,875423407011"
183+
- name: Download template
184+
uses: actions/download-artifact@v4
185+
with:
186+
path: tests/integration
180187
- name: Run benchmark job
181188
working-directory: tests/integration
182189
run: |
183-
echo "${{ needs.environment-setup.outputs.template }}" >> template.json
190+
cp template-${{ inputs.instance }}/template_tmp.json template.json
184191
python3 instant_benchmark.py --template template.json \
185192
--job ${{ matrix.job }} --instance ${{ inputs.instance }} \
186193
--record ${{ inputs.record }}

0 commit comments

Comments
 (0)