# https://github.com/aws/deep-learning-containers/blob/master/available_images.md # refer to the above page to pull latest Tensorflow image # docker image region us-west-2 FROM 763104351884.dkr.ecr.us-west-2.amazonaws.com/tensorflow-training:2.6.3-gpu-py38-cu112-ubuntu20.04 LABEL maintainer="Amazon AI" LABEL dlc_major_version="1" # version args ARG TRANSFORMERS_VERSION ARG DATASETS_VERSION ARG PYTHON=python3 # uninstall ipython jupyter utils due to incompatibility with typing-extensions==3.7.4.3 # https://github.com/huggingface/huggingface_hub/blob/main/setup.py:19 RUN pip uninstall -y IPython sparkmagic jupyter-console ipywidgets ipykernel hdijupyterutils jupyter sagemaker-studio-analytics-extension qtconsole notebook autovizwidget widgetsnbextension # install Hugging Face libraries and its dependencies RUN pip install --no-cache-dir \ transformers[sklearn,sentencepiece,audio,vision]==${TRANSFORMERS_VERSION} \ datasets==${DATASETS_VERSION} \ tensorflow-addons==0.12.0 \ psutil \ "typing-extensions==3.7.4.3" \ # bokeh 2.3.3 is the latest compatible version for typing-extensions 3.7.4.3 "bokeh==2.3.3" RUN apt-get update \ # TODO: Remove upgrade statements once packages are updated in base image && apt-get -y upgrade --only-upgrade systemd openssl cryptsetup\ && apt install -y git-lfs \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* 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*