Skip to content
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

Update mlflow base image and python versions for CVE #789

Merged
merged 4 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions models/mlflow/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG FROM_IMAGE="rapidsai/mambaforge-cuda"
ARG CUDA_VER=11.8
ARG LINUX_VER=ubuntu20.04
ARG PYTHON_VER=3.8
FROM ${FROM_IMAGE}:cuda${CUDA_VER}-base-${LINUX_DISTRO}${LINUX_VER}-py${PYTHON_VER} AS base
ARG FROM_IMAGE="condaforge/miniforge-pypy3"
ARG PYTHON_VER=3.11
ARG TAG=22.11.1-4
FROM ${FROM_IMAGE}:${TAG} AS base

WORKDIR /mlflow

Expand All @@ -35,15 +34,17 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
procps && \
apt clean && \
rm -rf /var/lib/apt/lists/*
# but pin python version to avoid some newer CVE
RUN source /etc/profile.d/conda.sh && conda deactivate && conda install "tini=0.19" python=${PYTHON_VER}

RUN source /opt/conda/etc/profile.d/conda.sh && conda deactivate \
&& conda update conda python=${PYTHON_VER} && conda install "tini=0.19" \
&& conda clean --all
RUN /opt/conda/bin/conda env create -f docker/conda/mlflow-env.yml
RUN sed -i 's/conda activate base/conda activate mlflow/g' ~/.bashrc

SHELL ["/opt/conda/bin/conda", "run", "-n", "mlflow", "/bin/bash", "-c"]

ARG TRITON_DIR=/mlflow/triton-inference-server
ARG TRITON_VER=r23.01
ARG TRITON_VER=r23.03

RUN mkdir ${TRITON_DIR} && \
cd ${TRITON_DIR} && \
Expand Down
2 changes: 1 addition & 1 deletion models/mlflow/docker/conda/mlflow-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.8
- python=3.11
- pip
- onnx
- openssl>=1.1.1s,<3
Expand Down