Skip to content

Commit

Permalink
dynamic holodeck ci instance name
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Dec 13, 2024
1 parent b119e94 commit a0917fc
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ on:
- opened
- synchronize
branches:
- main
- release-*
- main-no
- release-no
push:
branches:
- main
- release-*
- main-no
- release-no

jobs:
image:
Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@
# Run this workflow on a schedule
name: Precompiled images

# on:
# schedule:
# - cron: '00 09 * * *' # scheduled job

on:
schedule:
- cron: '00 09 * * *'
pull_request:
types:
- opened
- synchronize
branches:
- holodeckname
push:
branches:
- holodeckname

jobs:
set-driver-version-matrix:
Expand All @@ -37,17 +48,20 @@ jobs:
id: extract_driver_branch
run: |
# get driver_branch
DRIVER_BRANCH=("535" "550")
# DRIVER_BRANCH=("535" "550")
DRIVER_BRANCH=("550")
driver_branch_json=$(printf '%s\n' "${DRIVER_BRANCH[@]}" | jq -R . | jq -cs .)
echo "driver_branch=$driver_branch_json" >> $GITHUB_OUTPUT
# get kernel flavors
KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
KERNEL_FLAVORS=("aws")
kernel_flavors_json=$(printf '%s\n' "${KERNEL_FLAVORS[@]}" | jq -R . | jq -cs .)
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
# get ubuntu distributions
DIST=("ubuntu22.04" "ubuntu24.04")
# DIST=("ubuntu22.04" "ubuntu24.04")
DIST=("ubuntu22.04")
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
echo "dist=$dist_json" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -296,14 +310,22 @@ jobs:
driver_branch_json="${{ needs.set-driver-version-matrix.outputs.driver_branch }}"
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
REPO_NAME=${GITHUB_REPOSITORY##*/}
echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV
echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV
echo "GITHUB_ACTOR=${GITHUB_ACTOR}" >> $GITHUB_ENV
echo "INSTANCE_NAME=${REPO_NAME}-${GITHUB_REF_NAME}-${GITHUB_ACTOR}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "HOLODECK_NAME=${REPO_NAME}-${GITHUB_REF_NAME}-${GITHUB_ACTOR}-${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- name: Set up Holodeck
uses: NVIDIA/[email protected]
# uses: NVIDIA/[email protected]
uses: NVIDIA/holodeck@ci-dynamicname
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SSH_KEY: ${{ secrets.AWS_SSH_KEY }}
DIST: ${{ env.DIST }}
INSTANCE_NAME: ${{ env.REPO_NAME }}-${{ env.BRANCH_NAME }}-${{ env.GITHUB_ACTOR }}-${{ env.COMMIT_SHORT_SHA }}
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -410,6 +432,8 @@ jobs:

- name: Set image vars
run: |
# SHIVA
exit 0
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV
- name: Download built image artifact
Expand Down
2 changes: 1 addition & 1 deletion tests/holodeck_ubuntu22.04.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: holodeck.nvidia.com/v1alpha1
kind: Environment
metadata:
name: HOLODECK_NAME
name: ${INSTANCE_NAME}
description: "end-to-end test infrastructure"
spec:
provider: aws
Expand Down
2 changes: 1 addition & 1 deletion tests/holodeck_ubuntu24.04.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: holodeck.nvidia.com/v1alpha1
kind: Environment
metadata:
name: HOLODECK_NAME
name: ${INSTANCE_NAME}
description: "end-to-end test infrastructure"
spec:
provider: aws
Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/findkernelversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ if [[ $status -eq 0 ]]; then
else
export should_continue=true
fi
# SHIVA
export should_continue=true
6 changes: 0 additions & 6 deletions ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ RUN dpkg --add-architecture i386 && \
pkg-config && \
rm -rf /var/lib/apt/lists/*

# Fetch GPG keys for CUDA repo
RUN apt-key del 3bf863cc && \
rm /etc/apt/sources.list.d/cuda.list && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub | gpg --dearmor -o /etc/apt/keyrings/cuda.pub && \
echo "deb [signed-by=/etc/apt/keyrings/cuda.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" > /etc/apt/sources.list.d/cuda.list

RUN usermod -o -u 0 -g 0 _apt

# Install / upgrade packages here that are required to resolve CVEs
Expand Down

0 comments on commit a0917fc

Please sign in to comment.