-
Notifications
You must be signed in to change notification settings - Fork 24
Sync downstream main from upstream
#1521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aae0a60
076ef9b
52cee92
80a5cbb
d73e65c
03f1dd7
a801c39
6027bcf
dbb5ee5
23b1046
f224482
e06b68c
2270a47
f71bc18
d31d423
a742c56
8134f76
d0fccc2
904bf23
a7b8f66
798bfe2
00d9f61
70b47db
db1dca1
410b27d
20c2636
b82d67e
894c00c
1196d34
1bfafea
9faf7f7
d8d2bc6
d902a8e
f3c6c47
ae56a5c
3a6d985
c53b52b
f410e35
341d899
61d33e7
c553a86
ae521a6
1fecb8e
f8b07f5
84e3874
00dff74
1bd738f
fc46ec1
93c0810
99698b7
ae63572
2ad0673
1783197
1ff5c91
28d1db5
3f21665
41b4b85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,9 +67,20 @@ endif | |
| # ARG 2: Path of Dockerfile we want to build. | ||
| define build_image | ||
| $(eval IMAGE_NAME := $(IMAGE_REGISTRY):$(1)-$(IMAGE_TAG)) | ||
| $(eval BUILD_ARGS :=) | ||
|
|
||
| $(info # Building $(IMAGE_NAME) image...) | ||
| # Checks if there’s a build-args/*.conf matching the Dockerfile | ||
| $(eval BUILD_DIR := $(dir $(2))) | ||
| $(eval DOCKERFILE_NAME := $(notdir $(2))) | ||
| $(eval CONF_FILE := $(BUILD_DIR)build-args/$(shell echo $(DOCKERFILE_NAME) | cut -d. -f2).conf) | ||
|
|
||
| # if the conf file exists, transform it into --build-arg KEY=VALUE flags | ||
| $(eval BUILD_ARGS := $(shell if [ -f $(CONF_FILE) ]; then \ | ||
| while IFS='=' read -r k v; do \ | ||
| [ -n "$$k" ] && printf -- "--build-arg %s=%s " "$$k" "$$v"; \ | ||
| done < $(CONF_FILE); \ | ||
| fi)) | ||
|
|
||
| $(info # Building $(IMAGE_NAME) using $(DOCKERFILE_NAME) with $(CONF_FILE) and $(BUILD_ARGS)...) | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 The addition of logic to handle |
||
| $(ROOT_DIR)/scripts/sandbox.py --dockerfile '$(2)' --platform '$(BUILD_ARCH)' -- \ | ||
| $(CONTAINER_ENGINE) build $(CONTAINER_BUILD_CACHE_ARGS) --platform=$(BUILD_ARCH) --label release=$(RELEASE) --tag $(IMAGE_NAME) --file '$(2)' $(BUILD_ARGS) {}\; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,10 @@ RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3 | |
| ENV CUDA_VERSION=12.6.3 | ||
|
|
||
| # For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a | ||
| RUN yum upgrade -y && yum install -y \ | ||
| RUN dnf upgrade -y && dnf install -y \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Using |
||
| cuda-cudart-12-6-${NV_CUDA_CUDART_VERSION} \ | ||
| cuda-compat-12-6 \ | ||
| && yum clean all \ | ||
| && dnf clean all \ | ||
| && rm -rf /var/cache/yum/* | ||
|
|
||
| # nvidia-docker 1.0 | ||
|
|
@@ -67,20 +67,20 @@ ENV NV_LIBNCCL_VERSION=2.23.4 | |
| ENV NCCL_VERSION=2.23.4 | ||
| ENV NV_LIBNCCL_PACKAGE=${NV_LIBNCCL_PACKAGE_NAME}-${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.6 | ||
|
|
||
| RUN yum install -y \ | ||
| RUN dnf install -y \ | ||
| cuda-libraries-12-6-${NV_CUDA_LIB_VERSION} \ | ||
| cuda-nvtx-12-6-${NV_NVTX_VERSION} \ | ||
| ${NV_LIBNPP_PACKAGE} \ | ||
| libcublas-12-6-${NV_LIBCUBLAS_VERSION} \ | ||
| ${NV_LIBNCCL_PACKAGE} \ | ||
| && yum clean all \ | ||
| && dnf clean all \ | ||
| && rm -rf /var/cache/yum/* | ||
|
|
||
| # Install devel tools | ||
| RUN yum install -y \ | ||
| RUN dnf install -y \ | ||
| make \ | ||
| findutils \ | ||
| && yum clean all \ | ||
| && dnf clean all \ | ||
| && rm -rf /var/cache/yum/* | ||
|
|
||
| # Install CUDA cudnn9 from: | ||
|
|
@@ -90,17 +90,17 @@ ENV NV_CUDNN_PACKAGE=libcudnn9-cuda-12-${NV_CUDNN_VERSION} | |
|
|
||
| LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}" | ||
|
|
||
| RUN yum install -y \ | ||
| RUN dnf install -y \ | ||
| ${NV_CUDNN_PACKAGE} \ | ||
| && yum clean all \ | ||
| && dnf clean all \ | ||
| && rm -rf /var/cache/yum/* | ||
|
|
||
| # Set this flag so that libraries can find the location of CUDA | ||
| ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda | ||
|
|
||
| # Install CUDA toolkit 12.6 | ||
| RUN yum -y install cuda-toolkit-12-6 && \ | ||
| yum -y clean all --enablerepo="*" | ||
| RUN dnf -y install cuda-toolkit-12-6 && \ | ||
| dnf -y clean all --enablerepo="*" | ||
|
|
||
| # Restore user workspace | ||
| USER 1001 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| ######################### | ||
| # configuration args # | ||
| ######################### | ||
| ARG BASE_IMAGE | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 The introduction of |
||
|
|
||
| #################### | ||
| # base # | ||
| # cpu-base # | ||
| #################### | ||
| FROM registry.access.redhat.com/ubi9/python-312:latest AS base | ||
| FROM ${BASE_IMAGE} AS cpu-base | ||
|
|
||
| WORKDIR /opt/app-root/bin | ||
|
|
||
|
|
@@ -30,11 +35,10 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc | |
| rm -f /tmp/openshift-client-linux.tar.gz | ||
| # Install the oc client end | ||
|
|
||
|
|
||
| #################### | ||
| # codeserver # | ||
| #################### | ||
| FROM base AS codeserver | ||
| FROM cpu-base AS codeserver | ||
|
|
||
| ARG TARGETOS TARGETARCH | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| BASE_IMAGE=registry.access.redhat.com/ubi9/python-312:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 The change from
multiarch-pull-request-pipelinetomultiarch-push-pipelineis a good improvement, as it aligns the push pipeline with the new multi-arch build strategy.