ARG PYTHON_VERSION=3.8.13 FROM 763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-training:1.12.1-cpu-py38-ubuntu20.04-sagemaker # PYTORCH_SKIP_CUDNN_COMPATIBILITY_CHECK - see https://github.com/autogluon/autogluon/issues/2534 ENV PYTORCH_SKIP_CUDNN_COMPATIBILITY_CHECK=1 LABEL maintainer="Amazon AI" LABEL dlc_major_version="1" # Install dependencies RUN apt-get update \ && apt-get -y upgrade \ && apt-get install -y --no-install-recommends \ && apt-get autoremove -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* ARG AUTOGLUON_VERSION=0.6.2 # NOTE: reinstalling horovod with pytorch support because it is available in the container # Updating certifi - https://pyup.io/p/pypi/certifi/2ff/ RUN pip install --no-cache-dir -U --trusted-host pypi.org --trusted-host files.pythonhosted.org pip \ && pip install --no-cache-dir -U setuptools wheel \ && pip install --no-cache-dir -U numpy numba \ && pip install --no-cache-dir -U certifi \ && pip install --no-cache-dir -U autogluon==${AUTOGLUON_VERSION} \ && mim install -q mmcv-full \ && pip install --no-cache-dir -U mmdet # Removing GluonTS nursery/tsbench package - it is not used in training/inference and have security vulnerabilities RUN rm -rf /usr/local/lib/python3.8/dist-packages/gluonts/nursery/tsbench # Remove these JAR files to address security issues; these are not used if only python package is used RUN rm -rf /usr/local/lib/python3.8/dist-packages/ray/jars \ && rm -rf /opt/conda/lib/python3.8/site-packages/ray/jars RUN HOME_DIR=/root \ && curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ && unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \ && cp ${HOME_DIR}/oss_compliance/test/testOSSCompliance /usr/local/bin/testOSSCompliance \ && chmod +x /usr/local/bin/testOSSCompliance \ && chmod +x ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh \ && ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} python \ && rm -rf ${HOME_DIR}/oss_compliance* RUN curl -o /licenses-autogluon.txt https://autogluon.s3.us-west-2.amazonaws.com/licenses/THIRD-PARTY-LICENSES.txt CMD ["/bin/bash"]