# Ubuntu 18.04 FROM nvidia/cuda:10.2-cudnn8-devel-ubuntu18.04 ARG SPOT_SDK_VERSION # Set up Greengrass v2 execution parameters ENV GGC_ROOT_PATH=/greengrass/v2 RUN env # Install Greengrass version 2 and dependencies RUN apt-get update \ && apt-get install -y openjdk-8-jdk \ && apt-get -y install nano wget curl unzip nginx \ && apt-get -y install python3.7 python3-pip \ && apt-get install -y git build-essential cmake python3-dev libpython3.7-dev \ && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 \ && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \ && curl -s https://d2s8p88vqu9w66.cloudfront.net/releases/greengrass-nucleus-latest.zip > greengrass-nucleus-latest.zip RUN mkdir -p /opt/greengrassv2 /greengrass/v2 && unzip greengrass-nucleus-latest.zip -d /opt/greengrassv2 && rm greengrass-nucleus-latest.zip # Install AWS IoT SDK v2 RUN pip3 install awsiotsdk # Expose port to subscribe to MQTT messages, network port EXPOSE 8883 # Install spot-sdk COPY install-spot-sdk.sh / RUN chmod +x /install-spot-sdk.sh && ./install-spot-sdk.sh $SPOT_SDK_VERSION # Install TensorRT, CUDA, DLR RUN echo 'Install TensorRT and build DLR' ADD TensorRT-7.2.1.6.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz / COPY install-inference.sh / RUN chmod +x /install-inference.sh && ./install-inference.sh ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-10.2/lib64:/usr/local/cuda/lib64:/TensorRT-7.2.1.6/lib ENV PATH /usr/local/cuda-10.2/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV CUDA_HOME /usr/local/cuda-10.2 # Entrypoint script to install and run Greengrass COPY "greengrass-entrypoint.sh" / RUN chmod +x /greengrass-entrypoint.sh