docs: add 3090Ti power cap efficiency plot #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build vLLM Club3090 Image | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| upstream_image: | |
| description: "Upstream vLLM image to vendor overlays into" | |
| required: false | |
| default: "vllm/vllm-openai:nightly-1acd67a795ebccdf9b9db7697ae9082058301657" | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "v0.7.*" | |
| - "v0.[8-9].*" | |
| - "v[1-9]*" | |
| paths: | |
| - ".github/workflows/build-vllm-image.yml" | |
| - "docker/vllm-club3090/**" | |
| - "models/qwen3.6-27b/vllm/patches/**" | |
| - "models/gemma-4-31b/vllm/patches/**" | |
| concurrency: | |
| group: build-vllm-club3090-image | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| IMAGE_NAME: ghcr.io/noonghunna/vllm-club3090 | |
| DEFAULT_VLLM_BASE_IMAGE: vllm/vllm-openai:nightly-1acd67a795ebccdf9b9db7697ae9082058301657 | |
| jobs: | |
| build: | |
| name: Build and push dated image | |
| runs-on: ubuntu-latest | |
| outputs: | |
| image_ref: ${{ steps.meta.outputs.image_ref }} | |
| image_tag: ${{ steps.meta.outputs.image_tag }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| upstream_image: ${{ steps.meta.outputs.upstream_image }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Compute image metadata | |
| id: meta | |
| shell: bash | |
| env: | |
| INPUT_UPSTREAM_IMAGE: ${{ inputs.upstream_image }} | |
| run: | | |
| set -euo pipefail | |
| upstream_image="${INPUT_UPSTREAM_IMAGE:-${DEFAULT_VLLM_BASE_IMAGE}}" | |
| date_tag="$(date -u +%Y%m%d)" | |
| counter="$(printf "%04d" "${GITHUB_RUN_NUMBER}")" | |
| image_tag="nightly-${date_tag}-club${counter}" | |
| image_ref="${IMAGE_NAME}:${image_tag}" | |
| { | |
| echo "upstream_image=${upstream_image}" | |
| echo "image_tag=${image_tag}" | |
| echo "image_ref=${image_ref}" | |
| echo "tags<<EOF" | |
| echo "${image_ref}" | |
| if [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then | |
| echo "${IMAGE_NAME}:club-${GITHUB_REF_NAME}" | |
| fi | |
| echo "EOF" | |
| } >> "${GITHUB_OUTPUT}" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push dated image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/vllm-club3090/Dockerfile | |
| platforms: linux/amd64 | |
| pull: true | |
| push: true | |
| build-args: | | |
| VLLM_BASE_IMAGE=${{ steps.meta.outputs.upstream_image }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: | | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.version=${{ steps.meta.outputs.image_tag }} | |
| club3090.upstream_vllm_image=${{ steps.meta.outputs.upstream_image }} | |
| promote-aliases: | |
| name: Promote latest and nightly-stable | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Promote :latest and :nightly-stable to dated tag | |
| shell: bash | |
| env: | |
| IMAGE_REF: ${{ needs.build.outputs.image_ref }} | |
| run: | | |
| set -euo pipefail | |
| docker buildx imagetools create \ | |
| -t "${IMAGE_NAME}:latest" \ | |
| -t "${IMAGE_NAME}:nightly-stable" \ | |
| "${IMAGE_REF}" | |
| retention: | |
| name: Retain four weeks of dated nightlies | |
| needs: build | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Delete old dated nightly package versions | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const packageType = "container"; | |
| const packageName = "vllm-club3090"; | |
| const cutoff = Date.now() - 28 * 24 * 60 * 60 * 1000; | |
| async function listVersions(scope) { | |
| if (scope === "org") { | |
| return github.paginate("GET /orgs/{org}/packages/{package_type}/{package_name}/versions", { | |
| org: context.repo.owner, | |
| package_type: packageType, | |
| package_name: packageName, | |
| per_page: 100, | |
| }); | |
| } | |
| return github.paginate("GET /users/{username}/packages/{package_type}/{package_name}/versions", { | |
| username: context.repo.owner, | |
| package_type: packageType, | |
| package_name: packageName, | |
| per_page: 100, | |
| }); | |
| } | |
| async function deleteVersion(scope, id) { | |
| if (scope === "org") { | |
| return github.request("DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", { | |
| org: context.repo.owner, | |
| package_type: packageType, | |
| package_name: packageName, | |
| package_version_id: id, | |
| }); | |
| } | |
| return github.request("DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", { | |
| username: context.repo.owner, | |
| package_type: packageType, | |
| package_name: packageName, | |
| package_version_id: id, | |
| }); | |
| } | |
| let scope = "org"; | |
| let versions = []; | |
| try { | |
| versions = await listVersions(scope); | |
| } catch (error) { | |
| if (error.status !== 404) throw error; | |
| scope = "user"; | |
| try { | |
| versions = await listVersions(scope); | |
| } catch (userError) { | |
| if (userError.status === 404) { | |
| core.notice(`Package ${packageName} does not exist yet; retention skipped.`); | |
| return; | |
| } | |
| throw userError; | |
| } | |
| } | |
| for (const version of versions) { | |
| const tags = version.metadata?.container?.tags || []; | |
| if (tags.length === 0) continue; | |
| const protectedTag = tags.some((tag) => | |
| tag === "latest" || | |
| tag === "nightly-stable" || | |
| tag.startsWith("club-v") | |
| ); | |
| const datedNightly = tags.some((tag) => /^nightly-\d{8}-club\d{4,}$/.test(tag)); | |
| const updatedAt = new Date(version.updated_at).getTime(); | |
| if (datedNightly && !protectedTag && updatedAt < cutoff) { | |
| core.notice(`Deleting old ${packageName} package version ${version.id}: ${tags.join(", ")}`); | |
| await deleteVersion(scope, version.id); | |
| } | |
| } |