Skip to content

Commit 90f6d3d

Browse files
authored
Issue opendatahub-io#1588: fix comments in Konflux dockerfiles to work with dockerfile_fragments.py for managing Dockerfile blocks (#1488)
1 parent f1db72b commit 90f6d3d

File tree

30 files changed

+336
-111
lines changed

30 files changed

+336
-111
lines changed

codeserver/ubi9-python-3.11/Dockerfile.konflux.cpu

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633

2734
####################

codeserver/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633

2734
####################

jupyter/datascience/ubi9-python-3.11/Dockerfile.konflux.cpu

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,27 @@ WORKDIR /opt/app-root/bin
2121
# OS Packages needs to be installed as root
2222
USER root
2323

24+
# upgrade first to avoid fixable vulnerabilities begin
25+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
26+
&& dnf clean all -y
27+
# upgrade first to avoid fixable vulnerabilities end
28+
2429
# Install useful OS packages
2530
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
2631

2732
# Other apps and tools installed as default user
2833
USER 1001
2934

30-
# Install micropipenv to deploy packages from Pipfile.lock
31-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
35+
# Install micropipenv and uv to deploy packages from requirements.txt begin
36+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
37+
# Install micropipenv and uv to deploy packages from requirements.txt end
3238

33-
# Install the oc client
39+
# Install the oc client begin
3440
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
3541
-o /tmp/openshift-client-linux.tar.gz && \
3642
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
3743
rm -f /tmp/openshift-client-linux.tar.gz
44+
# Install the oc client end
3845

3946
####################
4047
# jupyter-minimal #
@@ -51,9 +58,10 @@ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
5158

5259
USER 0
5360

54-
# Dependencies for PDF export
61+
# Dependencies for PDF export begin
5562
RUN ./utils/install_pdf_deps.sh
5663
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
64+
# Dependencies for PDF export end
5765

5866
USER 1001
5967

@@ -63,7 +71,7 @@ ENTRYPOINT ["start-notebook.sh"]
6371

6472

6573
########################
66-
# jupytyer-datascience #
74+
# jupyter-datascience #
6775
########################
6876
FROM jupyter-minimal AS jupyter-datascience
6977

jupyter/datascience/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,27 @@ WORKDIR /opt/app-root/bin
2121
# OS Packages needs to be installed as root
2222
USER root
2323

24+
# upgrade first to avoid fixable vulnerabilities begin
25+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
26+
&& dnf clean all -y
27+
# upgrade first to avoid fixable vulnerabilities end
28+
2429
# Install useful OS packages
2530
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
2631

2732
# Other apps and tools installed as default user
2833
USER 1001
2934

30-
# Install micropipenv to deploy packages from Pipfile.lock
31-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
35+
# Install micropipenv and uv to deploy packages from requirements.txt begin
36+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
37+
# Install micropipenv and uv to deploy packages from requirements.txt end
3238

33-
# Install the oc client
39+
# Install the oc client begin
3440
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
3541
-o /tmp/openshift-client-linux.tar.gz && \
3642
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
3743
rm -f /tmp/openshift-client-linux.tar.gz
44+
# Install the oc client end
3845

3946
####################
4047
# jupyter-minimal #
@@ -51,9 +58,10 @@ COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
5158

5259
USER 0
5360

54-
# Dependencies for PDF export
61+
# Dependencies for PDF export begin
5562
RUN ./utils/install_pdf_deps.sh
5663
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
64+
# Dependencies for PDF export end
5765

5866
USER 1001
5967

jupyter/minimal/ubi9-python-3.11/Dockerfile.konflux.cpu

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
22-
-o /tmp/openshift-client-linux.tar.gz && \
28+
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633
####################
2734
# jupyter-minimal #
@@ -37,9 +44,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
3744

3845
USER 0
3946

40-
# Dependencies for PDF export
47+
# Dependencies for PDF export begin
4148
RUN ./utils/install_pdf_deps.sh
4249
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
50+
# Dependencies for PDF export end
4351

4452
USER 1001
4553

jupyter/minimal/ubi9-python-3.11/Dockerfile.konflux.cuda

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633
####################
2734
# cuda-base #
@@ -165,9 +172,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
165172

166173
USER 0
167174

168-
# Dependencies for PDF export
175+
# Dependencies for PDF export begin
169176
RUN ./utils/install_pdf_deps.sh
170177
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
178+
# Dependencies for PDF export end
171179

172180
USER 1001
173181

@@ -200,4 +208,3 @@ LABEL name="rhoai/odh-workbench-jupyter-minimal-cuda-py311-rhel9" \
200208
description="Minimal Jupyter CUDA notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
201209
io.k8s.description="Minimal Jupyter CUDA notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
202210
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
203-

jupyter/minimal/ubi9-python-3.11/Dockerfile.konflux.rocm

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633
########################
2734
# rocm-base #
@@ -71,9 +78,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
7178

7279
USER 0
7380

74-
# Dependencies for PDF export
81+
# Dependencies for PDF export begin
7582
RUN ./utils/install_pdf_deps.sh
7683
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
84+
# Dependencies for PDF export end
7785

7886
USER 1001
7987

jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633
####################
2734
# jupyter-minimal #
@@ -47,9 +54,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
4754

4855
USER 0
4956

50-
# Dependencies for PDF export
57+
# Dependencies for PDF export begin
5158
RUN ./utils/install_pdf_deps.sh
5259
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
60+
# Dependencies for PDF export end
5361

5462
USER 1001
5563

jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cuda

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,27 @@ WORKDIR /opt/app-root/bin
88
# OS Packages needs to be installed as root
99
USER 0
1010

11+
# upgrade first to avoid fixable vulnerabilities begin
12+
RUN dnf -y upgrade --refresh --best --nodocs --noplugins --setopt=install_weak_deps=0 --setopt=keepcache=0 \
13+
&& dnf clean all -y
14+
# upgrade first to avoid fixable vulnerabilities end
15+
1116
# Install useful OS packages
1217
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
1318

1419
# Other apps and tools installed as default user
1520
USER 1001
1621

17-
# Install micropipenv to deploy packages from Pipfile.lock
18-
RUN pip install --no-cache-dir -U "micropipenv[toml]"
22+
# Install micropipenv and uv to deploy packages from requirements.txt begin
23+
RUN pip install --no-cache-dir -U "micropipenv[toml]" "uv"
24+
# Install micropipenv and uv to deploy packages from requirements.txt end
1925

20-
# Install the oc client
26+
# Install the oc client begin
2127
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
2228
-o /tmp/openshift-client-linux.tar.gz && \
2329
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
2430
rm -f /tmp/openshift-client-linux.tar.gz
31+
# Install the oc client end
2532

2633
####################
2734
# cuda-base #
@@ -149,9 +156,10 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
149156

150157
USER 0
151158

152-
# Dependencies for PDF export
159+
# Dependencies for PDF export begin
153160
RUN ./utils/install_pdf_deps.sh
154161
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
162+
# Dependencies for PDF export end
155163

156164
USER 1001
157165

0 commit comments

Comments
 (0)