Skip to content

Commit

Permalink
Merge pull request #5 from elezar/update-images
Browse files Browse the repository at this point in the history
Update images
  • Loading branch information
elezar authored Jun 26, 2024
2 parents 5196dea + caebe55 commit bbac08f
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 120 deletions.
38 changes: 8 additions & 30 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,13 @@ stages:
- release

# Define the distribution targets
.dist-ubuntu18.04:
.dist-ubuntu22.04:
variables:
DIST: ubuntu18.04
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"

.dist-ubuntu20.04:
variables:
DIST: ubuntu20.04
CVE_UPDATES: "libsasl2-2 libsasl2-modules-db"
DIST: ubuntu22.04

.dist-ubi8:
variables:
DIST: ubi8
CVE_UPDATES: "cyrus-sasl-lib"

# Define the platform targets
.platform-amd64:
Expand Down Expand Up @@ -169,34 +162,19 @@ release:staging-vectoradd-ubi8:
needs:
- image-vectoradd-ubi8

release:staging-vectoradd-ubuntu18.04:
extends:
- .release:staging
- .dist-ubuntu18.04
- .sample-vectoradd
needs:
- image-vectoradd-ubuntu18.04

release:staging-vectoradd-ubuntu20.04:
release:staging-vectoradd-ubuntu22.04:
extends:
- .release:staging
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .sample-vectoradd
needs:
- image-vectoradd-ubuntu20.04
- image-vectoradd-ubuntu22.04

release:staging-device-query-ubuntu20.04:
release:staging-device-query-ubuntu22.04:
extends:
- .release:staging
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .sample-device-query
needs:
- image-device-query-ubuntu20.04
- image-device-query-ubuntu22.04

release:staging-nbody-ubuntu18.04:
extends:
- .release:staging
- .dist-ubuntu18.04
- .sample-nbody
needs:
- image-nbody-ubuntu18.04
2 changes: 1 addition & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
strategy:
matrix:
dist:
- ubuntu18.04
- ubuntu22.04
- ubi8
sample:
- vectorAdd
Expand Down
106 changes: 22 additions & 84 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,10 @@ variables:
- regctl registry login "${OUT_REGISTRY}" -u "${OUT_REGISTRY_USER}" -p "${OUT_REGISTRY_TOKEN}"
- make -f deployments/container/Makefile IMAGE=${IN_REGISTRY}/${IN_IMAGE_NAME}:${IN_VERSION}-${DIST} OUT_IMAGE=${OUT_IMAGE_NAME}:${OUT_VERSION}-${DIST} push-${DIST}

image-vectoradd-ubuntu18.04:
image-vectoradd-ubuntu22.04:
extends:
- .image-pull
- .dist-ubuntu18.04
- .sample-vectoradd

image-vectoradd-ubuntu20.04:
extends:
- .image-pull
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .sample-vectoradd

image-vectoradd-ubi8:
Expand All @@ -84,18 +78,12 @@ image-vectoradd-ubi8:
- .dist-ubi8
- .sample-vectoradd

image-device-query-ubuntu20.04:
image-device-query-ubuntu22.04:
extends:
- .image-pull
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .sample-device-query

image-nbody-ubuntu18.04:
extends:
- .image-pull
- .dist-ubuntu18.04
- .sample-nbody

# The .scan step forms the base of the image scan operation performed before releasing
# images.
.scan:
Expand Down Expand Up @@ -128,62 +116,43 @@ image-nbody-ubuntu18.04:
- policy_evaluation.json

# Define the scan targets
scan-vectoradd-ubuntu18.04-amd64:
extends:
- .scan
- .sample-vectoradd
- .dist-ubuntu18.04
- .platform-amd64
needs:
- image-vectoradd-ubuntu18.04

scan-vectoradd-ubuntu18.04-arm64:
extends:
- .scan
- .sample-vectoradd
- .dist-ubuntu18.04
- .platform-arm64
needs:
- image-vectoradd-ubuntu18.04
- scan-vectoradd-ubuntu18.04-amd64

scan-vectoradd-ubuntu20.04-amd64:
scan-vectoradd-ubuntu22.04-amd64:
extends:
- .scan
- .sample-vectoradd
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-amd64
needs:
- image-vectoradd-ubuntu20.04
- image-vectoradd-ubuntu22.04

scan-vectoradd-ubuntu20.04-arm64:
scan-vectoradd-ubuntu22.04-arm64:
extends:
- .scan
- .sample-vectoradd
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-arm64
needs:
- image-vectoradd-ubuntu20.04
- scan-vectoradd-ubuntu20.04-amd64
- image-vectoradd-ubuntu22.04
- scan-vectoradd-ubuntu22.04-amd64

scan-device-query-ubuntu20.04-amd64:
scan-device-query-ubuntu22.04-amd64:
extends:
- .scan
- .sample-device-query
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-amd64
needs:
- image-device-query-ubuntu20.04
- image-device-query-ubuntu22.04

scan-device-query-ubuntu20.04-arm64:
scan-device-query-ubuntu22.04-arm64:
extends:
- .scan
- .sample-device-query
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .platform-arm64
needs:
- image-device-query-ubuntu20.04
- scan-device-query-ubuntu20.04-amd64
- image-device-query-ubuntu22.04
- scan-device-query-ubuntu22.04-amd64

scan-vectoradd-ubi8-amd64:
extends:
Expand All @@ -204,25 +173,6 @@ scan-vectoradd-ubi8-arm64:
- image-vectoradd-ubi8
- scan-vectoradd-ubi8-amd64

scan-nbody-ubuntu18.04-amd64:
extends:
- .scan
- .sample-nbody
- .dist-ubuntu18.04
- .platform-amd64
needs:
- image-nbody-ubuntu18.04

scan-nbody-ubuntu18.04-arm64:
extends:
- .scan
- .sample-nbody
- .dist-ubuntu18.04
- .platform-arm64
needs:
- image-nbody-ubuntu18.04
- scan-nbody-ubuntu18.04-amd64

# Define external release helpers
.release:ngc:
extends:
Expand All @@ -235,32 +185,20 @@ scan-nbody-ubuntu18.04-arm64:

# Define the external release targets
# Release to NGC
release:ngc-vectoradd-ubuntu18.04:
release:ngc-vectoradd-ubuntu22.04:
extends:
- .release:ngc
- .dist-ubuntu18.04
- .dist-ubuntu22.04
- .sample-vectoradd

release:ngc-vectoradd-ubuntu20.04:
release:ngc-device-query-ubuntu22.04:
extends:
- .release:ngc
- .dist-ubuntu20.04
- .sample-vectoradd

release:ngc-device-query-ubuntu20.04:
extends:
- .release:ngc
- .dist-ubuntu20.04
- .dist-ubuntu22.04
- .sample-device-query

release:ngc-vectoradd-ubi8:
extends:
- .release:ngc
- .dist-ubi8
- .sample-vectoradd

release:ngc-nbody-ubuntu18.04:
extends:
- .release:ngc
- .dist-ubuntu18.04
- .sample-nbody
4 changes: 2 additions & 2 deletions deployments/container/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM nvidia/cuda:12.5.0-devel-ubuntu20.04 AS builder
FROM nvidia/cuda:12.5.0-devel-ubuntu22.04 AS builder

ARG SAMPLE_NAME
ENV SAMPLE_NAME ${SAMPLE_NAME}
Expand Down Expand Up @@ -41,7 +41,7 @@ RUN curl -L https://codeload.github.com/NVIDIA/cuda-samples/tar.gz/refs/tags/${C
make build && \
cp $(find /build/bin -iname "${SAMPLE_NAME}") /build/${SAMPLE_NAME}

FROM nvidia/cuda:12.5.0-base-ubuntu20.04
FROM nvidia/cuda:12.5.0-base-ubuntu22.04
ARG SAMPLE_NAME
LABEL io.k8s.display-name="NVIDIA CUDA ${SAMPLE_NAME} sample"
LABEL name="NVIDIA CUDA ${SAMPLE_NAME} sample"
Expand Down
4 changes: 2 additions & 2 deletions deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ OUT_IMAGE_VERSION ?= $(VERSION)
OUT_IMAGE_TAG ?= $(LOWER_CASE_SAMPLE)-$(OUT_IMAGE_VERSION)-$(DIST)
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)

DEFAULT_PUSH_TARGET := ubuntu18.04
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubi8
DEFAULT_PUSH_TARGET := ubuntu22.04
DISTRIBUTIONS := ubuntu22.04 ubi8

BUILD_TARGETS := $(patsubst %,build-%, $(DISTRIBUTIONS))
PUSH_TARGETS := $(patsubst %,push-%, $(DISTRIBUTIONS))
Expand Down
2 changes: 1 addition & 1 deletion versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ VERSION ?= cuda$(shell grep -Eo "FROM.*cuda:[0-9\.]+" deployments/container/Doc

# Specify the tag for the https://github.com/NVIDIA/cuda-samples repository.
# This need not match the CUDA_VERSION above.
CUDA_SAMPLES_VERSION := v11.6
CUDA_SAMPLES_VERSION := v12.0

0 comments on commit bbac08f

Please sign in to comment.