Skip to content

Commit 57f7400

Browse files
authored
Merge branch 'main' into djl
2 parents a185715 + 6ef6e10 commit 57f7400

File tree

5 files changed

+766
-0
lines changed

5 files changed

+766
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: 'Generate Release Spec'
2+
description: 'Generate release specification YAML from config file'
3+
4+
inputs:
5+
config-json:
6+
description: 'JSON string containing the configuration'
7+
required: true
8+
9+
outputs:
10+
release-spec:
11+
description: 'Generated release specification YAML'
12+
value: ${{ steps.generate.outputs.spec }}
13+
14+
runs:
15+
using: 'composite'
16+
steps:
17+
- name: Generate release spec
18+
id: generate
19+
shell: bash
20+
run: |
21+
echo '${{ inputs.config-json }}' > config.json
22+
23+
# Extract required values from config
24+
FRAMEWORK=$(jq -r '.common.framework' config.json)
25+
VERSION=$(jq -r '.common.framework_version' config.json)
26+
27+
# Validate required fields
28+
if [ -z "$FRAMEWORK" ] || [ "$FRAMEWORK" == "null" ]; then
29+
echo "Error: framework is required"
30+
exit 1
31+
fi
32+
33+
if [ -z "$VERSION" ] || [ "$VERSION" == "null" ]; then
34+
echo "Error: version is required"
35+
exit 1
36+
fi
37+
38+
# Extract optional values from config
39+
ARCH_TYPE=$(jq -r '.common.arch_type' config.json)
40+
JOB_TYPE=$(jq -r '.common.job_type' config.json)
41+
DEVICE_TYPE=$(jq -r '.common.device_type' config.json)
42+
PYTHON_VERSION=$(jq -r '.common.python_version' config.json)
43+
OS_VERSION=$(jq -r '.common.os_version' config.json)
44+
CUSTOMER_TYPE=$(jq -r '.common.customer_type' config.json)
45+
CUDA_VERSION=$(jq -r '.common.cuda_version' config.json)
46+
47+
# Extract boolean values
48+
FORCE_RELEASE=$(jq -r '.release.force_release' config.json)
49+
PUBLIC_REGISTRY=$(jq -r '.release.public_registry' config.json)
50+
PRIVATE_REGISTRY=$(jq -r '.release.private_registry' config.json)
51+
ENABLE_SOCI=$(jq -r '.release.enable_soci' config.json)
52+
53+
echo "Generating release spec with:"
54+
echo " Framework: ${FRAMEWORK} [required]"
55+
echo " Version: ${VERSION} [required]"
56+
[ "$ARCH_TYPE" != "null" ] && echo " Arch Type: ${ARCH_TYPE}"
57+
[ "$JOB_TYPE" != "null" ] && echo " Job Type: ${JOB_TYPE}"
58+
[ "$DEVICE_TYPE" != "null" ] && echo " Device Type: ${DEVICE_TYPE}"
59+
[ "$CUSTOMER_TYPE" != "null" ] && echo " Customer Type: ${CUSTOMER_TYPE}"
60+
[ "$FORCE_RELEASE" != "null" ] && echo " Force Release: ${FORCE_RELEASE}"
61+
[ "$PUBLIC_REGISTRY" != "null" ] && echo " Public Registry: ${PUBLIC_REGISTRY}"
62+
[ "$PRIVATE_REGISTRY" != "null" ] && echo " Private Registry: ${PRIVATE_REGISTRY}"
63+
[ "$ENABLE_SOCI" != "null" ] && echo " Enable SOCI: ${ENABLE_SOCI}"
64+
65+
# Generate release spec YAML with conditional fields
66+
{
67+
echo "spec<<EOF"
68+
69+
# Required fields
70+
echo "framework: \"${FRAMEWORK}\""
71+
echo "version: \"${VERSION}\""
72+
73+
# Optional string fields - only include if not null
74+
[ "$ARCH_TYPE" != "null" ] && echo "arch_type: \"${ARCH_TYPE}\""
75+
[ "$JOB_TYPE" != "null" ] && echo "job_type: \"${JOB_TYPE}\""
76+
[ "$DEVICE_TYPE" != "null" ] && echo "device_type: \"${DEVICE_TYPE}\""
77+
[ "$PYTHON_VERSION" != "null" ] && echo "python_version: \"${PYTHON_VERSION}\""
78+
[ "$OS_VERSION" != "null" ] && echo "os_version: \"${OS_VERSION}\""
79+
[ "$CUSTOMER_TYPE" != "null" ] && echo "customer_type: \"${CUSTOMER_TYPE}\""
80+
[ "$CUDA_VERSION" != "null" ] && echo "cuda_version: \"${CUDA_VERSION}\""
81+
82+
# Boolean flags - include if not null (handles both true and false)
83+
[ "$FORCE_RELEASE" != "null" ] && echo "force_release: ${FORCE_RELEASE}"
84+
[ "$PUBLIC_REGISTRY" != "null" ] && echo "public_registry: ${PUBLIC_REGISTRY}"
85+
[ "$PRIVATE_REGISTRY" != "null" ] && echo "private_registry: ${PRIVATE_REGISTRY}"
86+
[ "$ENABLE_SOCI" != "null" ] && echo "enable_soci: ${ENABLE_SOCI}"
87+
88+
echo "EOF"
89+
} >> ${GITHUB_OUTPUT}
90+
91+
echo "Release spec generated successfully"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 'Setup Release Package'
2+
description: 'Download and install release package from S3'
3+
4+
inputs:
5+
aws-region:
6+
description: 'AWS region for S3'
7+
required: false
8+
default: 'us-west-2'
9+
release-package-s3-bucket:
10+
description: 'S3 bucket containing the release package'
11+
required: false
12+
default: 'dlc-release-logic-v2'
13+
release-package-s3-prefix:
14+
description: 'S3 prefix/folder path to the package'
15+
required: false
16+
default: 'DLContainersReleaseLogicV2/DLContainersReleaseLogicV2'
17+
18+
runs:
19+
using: 'composite'
20+
steps:
21+
- name: Download release package from S3
22+
shell: bash
23+
run: |
24+
echo "Downloading fresh release package from S3..."
25+
PACKAGE_DIR="release_package"
26+
mkdir -p ${PACKAGE_DIR}
27+
28+
aws s3 sync \
29+
s3://${{ inputs.release-package-s3-bucket }}/${{ inputs.release-package-s3-prefix }} \
30+
${PACKAGE_DIR} \
31+
--region ${{ inputs.aws-region }}
32+
33+
if [ ! -d "${PACKAGE_DIR}" ] || [ -z "$(ls -A ${PACKAGE_DIR})" ]; then
34+
echo "Error: Failed to download package from S3"
35+
exit 1
36+
fi
37+
38+
echo "Package downloaded successfully"
39+
40+
- name: Setup virtual environment and install package
41+
shell: bash
42+
run: |
43+
PACKAGE_DIR="release_package"
44+
45+
echo "Creating virtual environment with uv..."
46+
uv venv --python 3.12 .venv
47+
48+
echo "Installing release package..."
49+
uv pip install -e ./${PACKAGE_DIR}
50+
51+
echo "Making scripts executable..."
52+
chmod +x ${PACKAGE_DIR}/scripts/*
53+
54+
echo "Package installed successfully"
55+
56+
- name: Activate environment
57+
shell: bash
58+
run: |
59+
PACKAGE_DIR="release_package"
60+
61+
echo "PACKAGE_DIR=${PACKAGE_DIR}" >> ${GITHUB_ENV}
62+
echo "VIRTUAL_ENV=${PWD}/.venv" >> ${GITHUB_ENV}
63+
64+
# Add both venv/bin and scripts directory to PATH
65+
echo "${PWD}/.venv/bin" >> ${GITHUB_PATH}
66+
echo "${PWD}/${PACKAGE_DIR}/scripts" >> ${GITHUB_PATH}
67+
68+
echo "Environment activated"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# vLLM RayServe Image Configuration
2+
# This file contains all configuration for building, testing, and releasing the vLLM RayServe image
3+
4+
# Image identification
5+
image:
6+
name: "vllm-rayserve"
7+
description: "vLLM with RayServe for EC2 instances"
8+
9+
# Build configuration
10+
common:
11+
framework: "vllm"
12+
framework_version: "0.10.2"
13+
job_type: "general"
14+
python_version: "py312"
15+
cuda_version: "cu129"
16+
os_version: "ubuntu22.04"
17+
customer_type: "rayserve_ec2"
18+
arch_type: "x86"
19+
prod_image: "vllm:0.10-gpu-py312-rayserve"
20+
device_type: "gpu"
21+
22+
# Release configuration
23+
release:
24+
release: true
25+
force_release: false
26+
public_registry: true
27+
private_registry: false
28+
enable_soci: true
29+
source_stage: beta # private for gamma test
30+
target_stage: release # gamma for gamma test

0 commit comments

Comments
 (0)