Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 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
1 change: 1 addition & 0 deletions .containerignore
49 changes: 49 additions & 0 deletions .github/workflows/container-maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Container Image Maintenance

on:
schedule:
- cron: '0 2 * * 3' # Runs at 2am on Wednesdays
workflow_dispatch: # Enables manual triggering of the workflow

# Only run one at a time
concurrency:
group: ${{ github.workflow }}

jobs:
cleanup-container-tags:
runs-on: ubuntu-latest
steps:
- name: Delete PR and untagged images older than 2 weeks
uses: snok/[email protected]
with:
account: ${{ github.actor }}
token: ${{ github.token }}
image-names: ${{ github.event.repository.name }}
image-tags: "pr-*"
cut-off: 2w
dry-run: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set this to dry-run for now until we can confirm it deletes the correct set of images.


push-container-tags:
runs-on: ubuntu-latest
needs: cleanup-container-tags
if: always() # Run after cleanup even if it fails
steps:
- name: Log into ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ github.token }}
registry: ghcr.io/${{ github.repository_owner }}
- name: Get list of tags
run: |
skopeo list-tags docker://${{ github.repository }} | jq --raw-output '.Tags[]' > tags
- name: Get latest release and rc tags
run: |
STABLE_TAG="$(grep -P '^v\d+\.\d+\.\d+$' tags | sort -rV | head -n1)"
echo "STABLE_TAG=${STABLE_TAG:-v0.0.0}" >> $GITHUB_ENV
LATEST_TAG="$(grep -P '^v\d+\.\d+\.\d+' tags | sort -rV | head -n1)"
echo "LATEST_TAG=${LATEST_TAG:-v0.0.0}" >> $GITHUB_ENV
- name: Update latest and stable tags
run: |
skopeo copy docker://${{ github.repository }}:${{ env.stable_tag }} docker://${{ github.repository }}:stable
skopeo copy docker://${{ github.repository }}:${{ env.latest_tag }} docker://${{ github.repository }}:latest
6 changes: 5 additions & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Buildah build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.event.repository.name }}
build-args: |
GUIDELLM_BUILD_TYPE=dev
tags: "pr-${{ github.event.number }}"
containerfiles: |
./deploy/Containerfile
./Containerfile
- name: Push To ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Buildah build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.event.repository.name }}
build-args: |
GUIDELLM_BUILD_TYPE=nightly
tags: nightly
containerfiles: |
./deploy/Containerfile
./Containerfile
- name: Push To ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from branch
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Buildah build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.event.repository.name }}
# TODO: Tag version
tags: latest
build-args: |
GUIDELLM_BUILD_TYPE=candidate
tags: ${{ env.package_version }}~rc
containerfiles: |
./deploy/Containerfile
./Containerfile
- name: Push To ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from branch
run: echo "PACKAGE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Buildah build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.event.repository.name }}
# TODO: Tag version
tags: latest stable
build-args: |
GUIDELLM_BUILD_TYPE=release
tags: ${{ env.package_version }}
containerfiles: |
./deploy/Containerfile
./Containerfile
- name: Push To ghcr.io
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
Expand Down
65 changes: 65 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# TODO: Update to official python-3.13-minimal image when available
ARG BASE_IMAGE=quay.io/psap/python-313-minimal:fedora

# release: take the last version and add a post if build iteration
# candidate: increment to next minor, add 'rc' with build iteration
# nightly: increment to next minor, add 'a' with build iteration
# alpha: increment to next minor, add 'a' with build iteration
# dev: increment to next minor, add 'dev' with build iteration
ARG GUIDELLM_BUILD_TYPE=dev

# Use a multi-stage build to create a lightweight production image
FROM $BASE_IMAGE as builder

# Switch to root for installing packages
USER root

# Install build tooling
RUN dnf install -y git \
&& python3 -m venv /tmp/pdm \
&& /tmp/pdm/bin/pip install --no-cache-dir -U pdm \
&& ln -s /tmp/pdm/bin/pdm /usr/local/bin/pdm

# Disable pdm update check
# Set correct build type for versioning
ENV PDM_CHECK_UPDATE=false \
GUIDELLM_BUILD_TYPE=$GUIDELLM_BUILD_TYPE

# Copy repository files
# Do this as late as possible to leverage layer caching
COPY / /opt/app-root/src

# Install guidellm and locked dependencies
RUN pdm use -p /opt/app-root/src -f /opt/app-root \
&& pdm install -p /opt/app-root/src --check --prod --no-editable

# Prod image
FROM $BASE_IMAGE

# Add guidellm bin to PATH
# Argument defaults can be set with GUIDELLM_<ARG>
ENV HOME="/home/guidellm" \
GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"

# Make sure root is the primary group
USER 1001:0

# Create the user home dir
WORKDIR $HOME

# Create a volume for results
VOLUME /results

# Metadata
LABEL io.k8s.display-name="GuideLLM" \
org.opencontainers.image.description="GuideLLM Performance Benchmarking Container" \
org.opencontainers.image.source="https://github.com/vllm-project/guidellm" \
org.opencontainers.image.documentation="https://blog.vllm.ai/guidellm/stable" \
org.opencontainers.image.license="Apache-2.0"

# Copy the virtual environment from the builder stage
# Do this as late as possible to leverage layer caching
COPY --chown=1001:0 --from=builder /opt/app-root /opt/app-root

ENTRYPOINT [ "/opt/app-root/bin/guidellm" ]
CMD [ "benchmark", "run" ]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ podman run \

Replace `latest` with `stable` for the newest tagged release or set a specific release if desired.

#### Available Tags

| Tags | Notes |
| ------------------------------------------------------------------------------------------ | --------------------------------------------- |
| `nightly` | Built from `main` every night |
| [`v0.3.0`](https://github.com/vllm-project/guidellm/releases/tag/v0.3.0) `stable` `latest` | - |
| [`v0.2.1`](https://github.com/vllm-project/guidellm/releases/tag/v0.2.1) | - |
| `pr-*` | Development builds (DO NOT USE IN PRODUCTION) |

### Quick Start

#### 1. Start an OpenAI Compatible Server (vLLM)
Expand Down
42 changes: 0 additions & 42 deletions deploy/Containerfile

This file was deleted.