Skip to content

Commit f71bc18

Browse files
committed
Update RStudio c9s flavos and its pipelines
1 parent 2270a47 commit f71bc18

File tree

6 files changed

+21
-114
lines changed

6 files changed

+21
-114
lines changed

.tekton/odh-workbench-rstudio-minimal-cpu-py311-c9s-push.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
pipelinesascode.tekton.dev/cancel-in-progress: "false"
1010
pipelinesascode.tekton.dev/max-keep-runs: "3"
1111
build.appstudio.openshift.io/build-nudge-files: "manifests/base/params-latest.env"
12-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-rstudio-minimal-cpu-py311-c9s-push.yaml".pathChanged() || "rstudio/c9s-python-3.11/**".pathChanged() )
12+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-rstudio-minimal-cpu-py311-c9s-push.yaml".pathChanged() || "rstudio/c9s-python-3.11/**".pathChanged() || || "rstudio/c9s-python-3.11/build-args/cpu.conf".pathChanged() )
1313
creationTimestamp:
1414
labels:
1515
appstudio.openshift.io/application: opendatahub-release
@@ -29,6 +29,8 @@ spec:
2929
value: quay.io/opendatahub/odh-workbench-rstudio-minimal-cpu-py311-c9s:{{revision}}
3030
- name: dockerfile
3131
value: rstudio/c9s-python-3.11/Dockerfile.cpu
32+
- name: build-args-file
33+
value: rstudio/c9s-python-3.11/build-args/cpu.conf
3234
- name: path-context
3335
value: .
3436
- name: additional-tags

.tekton/odh-workbench-rstudio-minimal-cuda-py311-c9s-push.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
pipelinesascode.tekton.dev/cancel-in-progress: "false"
1010
pipelinesascode.tekton.dev/max-keep-runs: "3"
1111
build.appstudio.openshift.io/build-nudge-files: "manifests/base/params-latest.env"
12-
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-rstudio-minimal-cuda-py311-c9s-push.yaml".pathChanged() || "rstudio/c9s-python-3.11/**".pathChanged() )
12+
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main" && !("manifests/base/params-latest.env".pathChanged()) && ( ".tekton/odh-workbench-rstudio-minimal-cuda-py311-c9s-push.yaml".pathChanged() || "rstudio/c9s-python-3.11/**".pathChanged() || "rstudio/c9s-python-3.11/build-args/cuda.conf".pathChanged() )
1313
creationTimestamp:
1414
labels:
1515
appstudio.openshift.io/application: opendatahub-release
@@ -29,6 +29,8 @@ spec:
2929
value: quay.io/opendatahub/odh-workbench-rstudio-minimal-cuda-py311-c9s:{{revision}}
3030
- name: dockerfile
3131
value: rstudio/c9s-python-3.11/Dockerfile.cuda
32+
- name: build-args-file
33+
value: rstudio/c9s-python-3.11/build-args/cuda.conf
3234
- name: path-context
3335
value: .
3436
- name: additional-tags

rstudio/c9s-python-3.11/Dockerfile.cpu

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#####################
2-
# base #
3-
#####################
4-
FROM quay.io/sclorg/python-311-c9s:c9s AS base
1+
####################
2+
# cpu-base #
3+
####################
4+
ARG BASE_IMAGE
5+
FROM ${BASE_IMAGE} AS cpu-base
56

67
WORKDIR /opt/app-root/bin
78

@@ -35,7 +36,7 @@ WORKDIR /opt/app-root/src
3536
#####################
3637
# rstudio #
3738
#####################
38-
FROM base AS rstudio
39+
FROM cpu-base AS rstudio
3940

4041
ARG RSTUDIO_SOURCE_CODE=rstudio/c9s-python-3.11
4142

rstudio/c9s-python-3.11/Dockerfile.cuda

Lines changed: 7 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
#####################
2-
# base #
3-
#####################
4-
FROM quay.io/sclorg/python-311-c9s:c9s AS base
1+
####################
2+
# cuda-base #
3+
####################
4+
ARG BASE_IMAGE
5+
FROM ${BASE_IMAGE} AS cuda-base
6+
7+
ARG TARGETARCH
58

69
WORKDIR /opt/app-root/bin
710

@@ -32,109 +35,6 @@ RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/oc
3235

3336
WORKDIR /opt/app-root/src
3437

35-
####################
36-
# cuda-base #
37-
####################
38-
FROM base AS cuda-base-amd64
39-
ENV NVARCH=x86_64
40-
41-
FROM base AS cuda-base-arm64
42-
ENV NVARCH=sbsa
43-
44-
FROM cuda-base-${TARGETARCH} AS cuda-base
45-
46-
ARG TARGETARCH
47-
48-
ARG CUDA_SOURCE_CODE=cuda
49-
50-
# Install CUDA base from:
51-
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.6.3/ubi9/base/Dockerfile
52-
USER 0
53-
WORKDIR /opt/app-root/bin
54-
55-
ENV NVIDIA_REQUIRE_CUDA="cuda>=12.6 brand=unknown,driver>=470,driver<471 brand=grid,driver>=470,driver<471 brand=tesla,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=vapps,driver>=470,driver<471 brand=vpc,driver>=470,driver<471 brand=vcs,driver>=470,driver<471 brand=vws,driver>=470,driver<471 brand=cloudgaming,driver>=470,driver<471 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551"
56-
ENV NV_CUDA_CUDART_VERSION=12.6.77-1
57-
58-
COPY ${CUDA_SOURCE_CODE}/cuda.repo-${TARGETARCH} /etc/yum.repos.d/cuda.repo
59-
COPY ${CUDA_SOURCE_CODE}/NGC-DL-CONTAINER-LICENSE /
60-
61-
RUN NVIDIA_GPGKEY_SUM=d0664fbbdb8c32356d45de36c5984617217b2d0bef41b93ccecd326ba3b80c87 && \
62-
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${NVARCH}/D42D0685.pub | sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA && \
63-
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict -
64-
65-
ENV CUDA_VERSION=12.6.3
66-
67-
# For libraries in the cuda-compat-* package: https://docs.nvidia.com/cuda/eula/index.html#attachment-a
68-
RUN dnf upgrade -y && dnf install -y \
69-
cuda-cudart-12-6-${NV_CUDA_CUDART_VERSION} \
70-
cuda-compat-12-6 \
71-
&& dnf clean all \
72-
&& rm -rf /var/cache/yum/*
73-
74-
# nvidia-docker 1.0
75-
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
76-
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
77-
78-
ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
79-
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
80-
81-
# nvidia-container-runtime
82-
ENV NVIDIA_VISIBLE_DEVICES=all
83-
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
84-
85-
# Install CUDA runtime from:
86-
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.6.3/ubi9/runtime/Dockerfile
87-
ENV NV_CUDA_LIB_VERSION=12.6.3-1
88-
ENV NV_NVTX_VERSION=12.6.77-1
89-
ENV NV_LIBNPP_VERSION=12.3.1.54-1
90-
ENV NV_LIBNPP_PACKAGE=libnpp-12-6-${NV_LIBNPP_VERSION}
91-
ENV NV_LIBCUBLAS_VERSION=12.6.4.1-1
92-
ENV NV_LIBNCCL_PACKAGE_NAME=libnccl
93-
ENV NV_LIBNCCL_PACKAGE_VERSION=2.23.4-1
94-
ENV NV_LIBNCCL_VERSION=2.23.4
95-
ENV NCCL_VERSION=2.23.4
96-
ENV NV_LIBNCCL_PACKAGE=${NV_LIBNCCL_PACKAGE_NAME}-${NV_LIBNCCL_PACKAGE_VERSION}+cuda12.6
97-
98-
RUN dnf install -y \
99-
cuda-libraries-12-6-${NV_CUDA_LIB_VERSION} \
100-
cuda-nvtx-12-6-${NV_NVTX_VERSION} \
101-
${NV_LIBNPP_PACKAGE} \
102-
libcublas-12-6-${NV_LIBCUBLAS_VERSION} \
103-
${NV_LIBNCCL_PACKAGE} \
104-
&& dnf clean all \
105-
&& rm -rf /var/cache/yum/*
106-
107-
# Install devel tools
108-
109-
RUN dnf install -y \
110-
make \
111-
findutils \
112-
&& dnf clean all \
113-
&& rm -rf /var/cache/yum/*
114-
115-
# Install CUDA cudnn9 from:
116-
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.6.3/ubi9/runtime/cudnn/Dockerfile
117-
ENV NV_CUDNN_VERSION=9.5.1.17-1
118-
ENV NV_CUDNN_PACKAGE=libcudnn9-cuda-12-${NV_CUDNN_VERSION}
119-
120-
LABEL com.nvidia.cudnn.version="${NV_CUDNN_VERSION}"
121-
122-
RUN dnf install -y \
123-
${NV_CUDNN_PACKAGE} \
124-
&& dnf clean all \
125-
&& rm -rf /var/cache/yum/*
126-
127-
# Set this flag so that libraries can find the location of CUDA
128-
ENV XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/local/cuda
129-
130-
# Install CUDA toolkit 12.6
131-
RUN dnf -y install cuda-toolkit-12-6 && \
132-
dnf -y clean all --enablerepo="*"
133-
134-
# Restore notebook user workspace
135-
USER 1001
136-
WORKDIR /opt/app-root/src
137-
13838
#####################
13939
# rstudio #
14040
#####################
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BASE_IMAGE=quay.io/sclorg/python-311-c9s:c9s
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BASE_IMAGE=quay.io/rh_ee_atheodor/base-image-cuda-py311-c9s:v12.6 #TO BE UPDATED

0 commit comments

Comments
 (0)