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

Various Dockerfile-based updates for 22.11 #466

Merged
5 commits merged into from
Nov 18, 2022
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
2 changes: 1 addition & 1 deletion ci/conda/recipes/morpheus/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ outputs:
- distributed
- docker-py 5.0
- grpcio # Version determined from cudf
- mlflow >=1.23
- mlflow >1.29,<2
- networkx 2.8
- numpydoc 1.4
- pandas 1.3
Expand Down
3 changes: 0 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ RUN --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target
CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus -c local -c rapidsai -c nvidia -c nvidia/label/dev -c conda-forge morpheus &&\
# Install runtime dependencies that are pip-only
/opt/conda/bin/mamba env update -n morpheus --file docker/conda/environments/cuda${CUDA_VER}_runtime.yml &&\
# Install jupyter support (e.g., DFP)
# TODO: this might not be the right spot to get these
/opt/conda/bin/mamba install -n morpheus ipywidgets jupyterlab nb_conda_kernels &&\
# Clean and activate
conda clean -afy

Expand Down
2 changes: 1 addition & 1 deletion docker/conda/environments/cuda11.5_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- include-what-you-use=0.18
- isort
- librdkafka=1.7.0
- mlflow>=1.23
- mlflow>1.29,<2
- myst-parser==0.17
- networkx=2.8
- ninja=1.10
Expand Down
1 change: 1 addition & 0 deletions docker/conda/environments/cuda11.5_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ channels:
- rapidsai-nightly
- conda-forge
dependencies:
- nb_conda_kernels
- pip
####### Morpheus Pip Dependencies (keep sorted!) #######
- pip:
Expand Down
3 changes: 3 additions & 0 deletions docker/conda/environments/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
####### Pip-only runtime dependencies (keep sorted!) #######
# Packages listed here should also be listed in setup.py
git+https://github.com/nv-morpheus/dfencoder.git@branch-22.09#egg=dfencoder
ipywidgets
jupyter-core>=4.11.2,<5.0
jupyterlab
nvidia-pyindex
torch==1.10.2+cu113
tritonclient[all]==2.17.*
Expand Down
2 changes: 2 additions & 0 deletions examples/digital_fingerprinting/production/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ MLflow for this production digital fingerprint use case can be installed from NG

The deployment of the [Morpheus SDK Client](../../../docs/source/morpheus_quickstart_guide.md#install-morpheus-sdk-client) is also done _almost_ the same way as what's specified in the Quick Start Guide. However, you would specify command arguments differently for this production DFP use case.

NOTE: The published SDK image includes a minimal set of packages for launching JupyterLab but you will likely still want to update the conda environment inside the running pod with the `conda_env.yml` file in this same directory to install other use case dependencies such as boto3 and s3fs.

#### Notebooks

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt update && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/*

# Install python packages
RUN pip install "mlflow<1.29.0" boto3 pymysql pyyaml
RUN pip install "mlflow>1.29.0,<2" boto3 pymysql pyyaml

# We run on port 5000
EXPOSE 5000
Expand Down
8 changes: 7 additions & 1 deletion models/mlflow/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
ARG FROM_IMAGE=gpuci/miniforge-cuda
ARG CUDA_VER=11.5
ARG LINUX_VER=ubuntu20.04
ARG PYTHON_VER=3.8
FROM ${FROM_IMAGE}:${CUDA_VER}-runtime-${LINUX_VER} AS base

WORKDIR /mlflow
Expand All @@ -24,13 +25,15 @@ COPY . ./

# need to do an upgrade in case gpuci is stale for whatever reason
RUN apt-get update && apt upgrade -y && apt-get install -y procps vim
# but pin python version to avoid some newer CVE
RUN source /etc/profile.d/conda.sh && conda deactivate && conda install python=${PYTHON_VER}
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=r22.08
ARG TRITON_VER=r22.10
mdemoret-nv marked this conversation as resolved.
Show resolved Hide resolved

RUN mkdir ${TRITON_DIR} && \
cd ${TRITON_DIR} && \
Expand All @@ -45,6 +48,9 @@ RUN ln -sf ${TRITON_DIR}/server/deploy/mlflow-triton-plugin/scripts/publish_mode
# remedy for CVE-2015-20107
RUN find / -name '*mailcap*.*py*' | xargs rm

# remedy for CVE-2022-42919
RUN find / -path '*multiprocessing/util.py' -exec sed -i 's/=\s*_platform_supports_abstract_sockets()/= False/g' {} +

EXPOSE 5000

# Set the entrypoint to use the entrypoint.sh script which sets the conda env
Expand Down
4 changes: 2 additions & 2 deletions models/mlflow/docker/conda/mlflow-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ dependencies:
- python=3.8
- pip
- onnx
- openssl>=1.1.1q
- openssl>=1.1.1s,<3
- psycopg2<3
- pip:
- boto3
- mlflow<1.29.0
- mlflow>1.29.0,<2
- pymysql