diff --git a/docker/1.3.1/py3/Dockerfile.eia b/docker/1.3.1/py3/Dockerfile.eia deleted file mode 100644 index a8f7ee30..00000000 --- a/docker/1.3.1/py3/Dockerfile.eia +++ /dev/null @@ -1,110 +0,0 @@ -FROM ubuntu:16.04 -LABEL maintainer="Amazon AI" -LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true - -# Add arguments to achieve the version, python and url -ARG PYTHON_VERSION=3.6.6 -ARG PYTORCH_VERSION=1.3.1 -ARG TORCHVISION_VERSION=0.4.2 -ARG GRAPHVIZ_VERSION=0.13.2 -ARG MMS_VERSION=1.0.8 -ARG HEALTH_CHECK_VERSION=1.6.2 - -# See http://bugs.python.org/issue19846 -ENV LANG C.UTF-8 -ENV LD_LIBRARY_PATH /opt/conda/lib/:$LD_LIBRARY_PATH -ENV PATH /opt/conda/bin:$PATH -ENV SAGEMAKER_SERVING_MODULE sagemaker_pytorch_serving_container.serving:main -ENV TEMP=/home/model-server/tmp - -RUN apt-get update \ - && apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \ - build-essential \ - ca-certificates \ - cmake \ - curl \ - git \ - jq \ - libgl1-mesa-glx \ - libglib2.0-0 \ - libgomp1 \ - libibverbs-dev \ - libsm6 \ - libxext6 \ - libxrender-dev \ - openjdk-8-jdk-headless \ - vim \ - wget \ - zlib1g-dev - -# Install OpenSSH. Allow OpenSSH to talk to containers without asking for confirmation -RUN apt-get install -y --no-install-recommends \ - openssh-client \ - openssh-server \ - && mkdir -p /var/run/sshd \ - && cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new \ - && echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new \ - && mv /etc/ssh/ssh_config.new /etc/ssh/ssh_configs - -RUN curl -L -o ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - && chmod +x ~/miniconda.sh \ - && ~/miniconda.sh -b -p /opt/conda \ - && rm ~/miniconda.sh \ - && /opt/conda/bin/conda update conda \ - && /opt/conda/bin/conda install -y \ - python=$PYTHON_VERSION \ - cython==0.29.12 \ - ipython==7.7.0 \ - numpy==1.16.4 \ - scipy==1.3.0 \ - typing==3.6.4 \ - && /opt/conda/bin/conda clean -ya - -RUN conda install -c \ - conda-forge \ - opencv==4.0.1 \ - && conda install -y \ - scikit-learn==0.21.2 \ - pandas==0.25.0 \ - h5py==2.9.0 \ - requests==2.22.0 \ - && conda clean -ya \ - && /opt/conda/bin/conda config --set ssl_verify False \ - && pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org \ - && ln -s /opt/conda/bin/pip /usr/local/bin/pip3 \ - # Torchvision wheel must be installed first, so that PyTorch-EI framework is not overwritten. - && pip install https://download.pytorch.org/whl/cpu/torchvision-0.4.2%2Bcpu-cp36-cp36m-linux_x86_64.whl \ - && pip install https://s3.amazonaws.com/amazonei-pytorch/torch_eia-1.3.1-cp36-cp36m-manylinux1_x86_64.whl \ - && pip install graphviz==$GRAPHVIZ_VERSION \ - && pip install mxnet-model-server==$MMS_VERSION \ - && pip install pillow==7.1.0 - -RUN useradd -m model-server \ - && mkdir -p /home/model-server/tmp \ - && chown -R model-server /home/model-server - -COPY mms-entrypoint.py /usr/local/bin/dockerd-entrypoint.py -COPY config.properties /home/model-server - -RUN chmod +x /usr/local/bin/dockerd-entrypoint.py - -RUN pip install --no-cache-dir "sagemaker-pytorch-inference<2" - -RUN curl https://aws-dlc-licenses.s3.amazonaws.com/pytorch/license.txt -o /license.txt - -RUN conda install -y -c conda-forge pyyaml==5.3.1 \ - && pip install -U \ - sagemaker-containers==2.8.6 \ - awscli - -RUN wget https://amazonei-tools.s3.amazonaws.com/v${HEALTH_CHECK_VERSION}/ei_tools_${HEALTH_CHECK_VERSION}.tar.gz -O /opt/ei_tools_${HEALTH_CHECK_VERSION}.tar.gz \ - && tar -xvf /opt/ei_tools_${HEALTH_CHECK_VERSION}.tar.gz -C /opt/ \ - && rm -rf /opt/ei_tools_${HEALTH_CHECK_VERSION}.tar.gz \ - && chmod a+x /opt/ei_tools/bin/health_check \ - && mkdir -p /opt/ei_health_check/bin \ - && ln -s /opt/ei_tools/bin/health_check /opt/ei_health_check/bin/health_check \ - && ln -s /opt/ei_tools/lib /opt/ei_health_check/lib - -EXPOSE 8080 8081 -ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"] -CMD ["mxnet-model-server", "--start", "--mms-config", "/home/model-server/config.properties"]