Skip to content

Commit

Permalink
Update RAI tabular image to ubuntu 22.04 (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
imatiach-msft authored Feb 26, 2025
1 parent c650b13 commit fad72eb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
azure-common
azure-ai-ml~=1.14.0
azure-ai-ml~=1.25.0
mltable~=1.4.1
azureml_dataprep
azureml_dataprep_rslex
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
azure-common
azure-ai-ml~=1.14.0
azure-ai-ml~=1.25.0
mltable~=1.4.1
azureml_dataprep
azureml_dataprep_rslex
Expand Down
36 changes: 20 additions & 16 deletions src/responsibleai/docker_env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04:latest

ENV AZUREML_CONDA_ENVIRONMENT_PATH /azureml-envs/responsibleai-tabular
FROM mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu22.04:latest

# Install wkhtmltopdf for pdf rendering from html
RUN apt-get -y update && apt-get -y install wkhtmltopdf

# Prepend path to AzureML conda environment
ENV PATH $AZUREML_CONDA_ENVIRONMENT_PATH/bin:$PATH
WORKDIR /
ENV CONDA_PREFIX=/azureml-envs/responsibleai-tabular
ENV CONDA_DEFAULT_ENV=$CONDA_PREFIX

# Create conda environment
COPY conda_dependencies.yaml .
RUN conda env create -p $AZUREML_CONDA_ENVIRONMENT_PATH -f conda_dependencies.yaml -q && \
rm conda_dependencies.yaml && \
conda run -p $AZUREML_CONDA_ENVIRONMENT_PATH pip cache purge && \
conda clean -a -y
RUN conda env create -p $CONDA_PREFIX -f conda_dependencies.yaml -q && \
rm conda_dependencies.yaml

# Prepend path to AzureML conda environment
ENV PATH=$CONDA_PREFIX/bin:$PATH

RUN conda list
# Conda install and pip install could happen side by side. Remove crypytography with vulnerability from conda
RUN conda remove cryptography

RUN pip install --pre 'azure-ai-ml' 'azure-storage-blob<=12.13.0' 'numpy<1.24.0'

Expand All @@ -31,10 +29,10 @@ RUN pip install --no-deps 'charset-normalizer==2.0.12' \
'domonic==0.9.10'

# Install azureml packages
RUN pip install 'azureml-dataset-runtime==1.56.0' \
'azureml-core==1.56.0' \
'azureml-mlflow==1.56.0' \
'azureml-telemetry==1.56.0' \
RUN pip install 'azureml-dataset-runtime' \
'azureml-core' \
'azureml-mlflow' \
'azureml-telemetry' \
'azureml-rai-utils==0.0.6'

# azureml-dataset-runtime[fuse] upper bound for pyarrow is 11.0.0
Expand All @@ -52,7 +50,13 @@ RUN pip install 'gunicorn>=22.0.0'
RUN pip install 'Werkzeug>=3.0.3'
RUN pip install 'tqdm>=4.66.3'

# clean conda and pip caches
RUN conda run -p $CONDA_PREFIX pip cache purge && \
conda clean -a -y

RUN rm -rf ~/.cache/pip

RUN pip freeze

# This is needed for mpi to locate libpython
ENV LD_LIBRARY_PATH $AZUREML_CONDA_ENVIRONMENT_PATH/lib:$LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH $CONDA_PREFIX/lib:$LD_LIBRARY_PATH
1 change: 0 additions & 1 deletion src/responsibleai/docker_env/conda_dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: responsibleai-tabular
channels:
- conda-forge
- defaults
- anaconda
dependencies:
- python=3.9
Expand Down

0 comments on commit fad72eb

Please sign in to comment.