Skip to content

Commit

Permalink
Merge pull request #168 from red-hat-data-services/release-2023b
Browse files Browse the repository at this point in the history
sync rhoai-2.8 with all the commit form Release-2023b
  • Loading branch information
harshad16 authored Mar 1, 2024
2 parents b7a57db + 53d2813 commit 37e8782
Show file tree
Hide file tree
Showing 73 changed files with 832 additions and 1,787 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,13 @@ jobs:
echo "There were errors in some of the checked files. Please run `json_verify` on such files and fix issues there."
fi
exit "${ret_code}"
- name: Validate Dockerfiles
id: validate-dockerfiles
run: |
type hadolint || sudo apt-get -y install wget \
&& wget --output-document=hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 \
&& chmod a+x hadolint
echo "Starting Hadolint"
find . -name "Dockerfile" | xargs ./hadolint --config ./ci/hadolint-config.yaml
echo "Hadolint done"
2 changes: 1 addition & 1 deletion base/anaconda-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ENV BASH_ENV="source /opt/anaconda3/bin/activate ${APP_ROOT}" \
USER 1001

# Set the default CMD to print the usage of the language image.
CMD $STI_SCRIPTS_PATH/usage
CMD ["$STI_SCRIPTS_PATH/usage"]


FROM s2i-python-anaconda-38-base
Expand Down
4 changes: 2 additions & 2 deletions base/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LABEL name="odh-notebook-base-centos-stream9-python-3.9" \
WORKDIR /opt/app-root/bin

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install -U "micropipenv[toml]"
RUN pip install --no-cache-dir -U "micropipenv[toml]"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
Expand All @@ -22,7 +22,7 @@ COPY Pipfile.lock ./
USER root

# Install usefull OS packages
RUN dnf install -y mesa-libGL
RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum

# Other apps and tools installed as default user
USER 1001
Expand Down
2 changes: 1 addition & 1 deletion base/ubi8-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN dnf update -y libnghttp2 && dnf clean all
USER 1001

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install -U "micropipenv[toml]"
RUN pip install --no-cache-dir -U "micropipenv[toml]"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
Expand Down
4 changes: 2 additions & 2 deletions base/ubi9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LABEL name="odh-notebook-base-ubi9-python-3.9" \
WORKDIR /opt/app-root/bin

# Install micropipenv to deploy packages from Pipfile.lock
RUN pip install -U "micropipenv[toml]"
RUN pip install --no-cache-dir -U "micropipenv[toml]"

# Install Python dependencies from Pipfile.lock file
COPY Pipfile.lock ./
Expand All @@ -24,7 +24,7 @@ RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./P
USER root

# Install usefull OS packages
RUN dnf install -y mesa-libGL
RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum

# Other apps and tools installed as default user
USER 1001
Expand Down
36 changes: 36 additions & 0 deletions ci/hadolint-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

# Reference https://github.com/hadolint/hadolint
# hadolint --config ./ci/hadolint-config.yaml <Dockerfile>

# We should revisit this ignore list and reduce it regularly

ignored:
# DL3006 warning: Always tag the version of an image explicitly
- DL3006
# DL3033 warning: Specify version with `yum install -y <package>-<version>`.
- DL3033
# DL3045 warning: `COPY` to a relative destination without `WORKDIR` set.
- DL3045
# DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
- DL3041
# DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
- DL3059
# DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use
# `pip install <package>==<version>` or `pip install --requirement <requirements file>`
- DL3013
# DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it.
# If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox
# then consider explicitly setting your SHELL to /bin/ash, or disable this check
- DL4006
# DL3007 warning: Using latest is prone to errors if the image will ever update.
# Pin the version explicitly to a release tag
- DL3007
# SC3060 warning: In POSIX sh, string replacement is undefined.
- SC3060
# SC2086 info: Double quote to prevent globbing and word splitting.
- SC2086
# SC2046 warning: Quote this to prevent word splitting.
- SC2046
# SC2140 warning: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
- SC2140
2 changes: 1 addition & 1 deletion codeserver/c9s-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ WORKDIR /opt/app-root/src

USER 1001

CMD /opt/app-root/bin/run-code-server.sh
CMD ["/opt/app-root/bin/run-code-server.sh"]
4 changes: 2 additions & 2 deletions codeserver/ubi9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN echo "Installing softwares and packages" && \
fix-permissions /opt/app-root -P

# Install usefull OS packages
RUN dnf install -y jq git-lfs libsndfile
RUN dnf install -y jq git-lfs libsndfile && dnf clean all && rm -rf /var/cache/yum

# Install code-server
RUN yum install -y "https://github.com/coder/code-server/releases/download/${CODESERVER_VERSION}/code-server-${CODESERVER_VERSION/v/}-amd64.rpm" && \
Expand Down Expand Up @@ -105,4 +105,4 @@ WORKDIR /opt/app-root/src

USER 1001

CMD /opt/app-root/bin/run-code-server.sh
CMD ["/opt/app-root/bin/run-code-server.sh"]
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"display_name": "Datascience with Python 3.8 (UBI8)",
"metadata": {
"tags": ["datascience"],
"display_name": "Datascience with Python 3.8 (UBI8)",
"metadata": {
"tags": ["datascience"],
"display_name": "Datascience with Python 3.8 (UBI8)",
"image_name": "quay.io/modh/runtime-images@sha256:2bce614baa7cc4a5fe1dc71bb2059fea051b70a33031eb963b0571d6d9f834c2",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
"image_name": "quay.io/modh/runtime-images@sha256:fa55ca793a171d3fbce02bc28794450f28bf7e5c2119a4d6e9833fc7b7fe9e05",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"display_name": "Pytorch with CUDA and Python 3.8 (UBI8)",
"metadata": {
"tags": ["pytorch"],
"display_name": "Pytorch with CUDA and Python 3.8 (UBI8)",
"metadata": {
"tags": ["pytorch"],
"display_name": "Pytorch with CUDA and Python 3.8 (UBI8)",
"image_name": "quay.io/modh/runtime-images@sha256:2a9be55d577a3b2ab50f0505ed096896cc3b914e732850fd5d5f733a79a000b8",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
"image_name": "quay.io/modh/runtime-images@sha256:60f79be28b0b01b09cec7d4a6c28edd9eae4d76784855a6f6006e31f2c1b21ff",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"display_name": "TensorFlow with CUDA and Python 3.8 (UBI8)",
"metadata": {
"tags": ["tensorflow"],
"display_name": "TensorFlow with CUDA and Python 3.8 (UBI8)",
"metadata": {
"tags": ["tensorflow"],
"display_name": "TensorFlow with CUDA and Python 3.8 (UBI8)",
"image_name": "quay.io/modh/runtime-images@sha256:89430fe6263beaa840d156a7325c1df8bbec1b749eeff672eae32df39ead8cc1",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
"image_name": "quay.io/modh/runtime-images@sha256:5b141c3fa2194d936fd0b4c993601b3eeaf3d05a0cb8e14c49976b5d8a59635f",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"display_name": "Python 3.8 (UBI8)",
"metadata": {
"tags": ["minimal"],
"display_name": "Python 3.8 (UBI8)",
"metadata": {
"tags": ["minimal"],
"display_name": "Python 3.8 (UBI8)",
"image_name": "quay.io/modh/runtime-images@sha256:bd1710de5503448f9f4016d943365c235437246837aca6419b6d51431d3bc18b",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
"image_name": "quay.io/modh/runtime-images@sha256:7afb95d311e7261ab90ea55002e45c3f1787d9e346680d6daaddc9cd53697331",
"pull_policy": "IfNotPresent"
},
"schema_name": "runtime-image"
}
6 changes: 3 additions & 3 deletions jupyter/datascience/ubi8-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ COPY utils ./utils/
USER root

# Install usefull OS packages
RUN dnf install -y jq unixODBC git-lfs libsndfile
RUN dnf install -y jq unixODBC git-lfs libsndfile && dnf clean all && rm -rf /var/cache/yum

# Disable announcement plugin of jupyterlab
RUN jupyter labextension disable "@jupyterlab/apputils-extension:announcements"

# Install MongoDB Client, We need a special repo for MongoDB as they do their own distribution
COPY mongodb-org-6.0.repo-x86_64 /etc/yum.repos.d/mongodb-org-6.0.repo

RUN dnf install -y mongocli
RUN dnf install -y mongocli && dnf clean all && rm -rf /var/cache/yum

# Install MSSQL Client, We need a special repo for MSSQL as they do their own distribution
COPY mssql-2022.repo-x86_64 /etc/yum.repos.d/mssql-2022.repo

RUN ACCEPT_EULA=Y dnf install -y mssql-tools18 unixODBC-devel
RUN ACCEPT_EULA=Y dnf install -y mssql-tools18 unixODBC-devel && dnf clean all && rm -rf /var/cache/yum

ENV PATH="$PATH:/opt/mssql-tools18/bin"

Expand Down
2 changes: 1 addition & 1 deletion jupyter/datascience/ubi8-python-3.8/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plotly = "~=5.16.1"
scikit-learn = "~=1.3.0"
scipy = "~=1.10.0"
skl2onnx = "~=1.15.0"
codeflare-sdk = "~=0.14.0"
codeflare-sdk = "~=0.14.1"
# DB connectors
pymongo = "~=4.5.0"
psycopg = "~=3.1.10"
Expand Down
Loading

0 comments on commit 37e8782

Please sign in to comment.