Dockerfile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
  2. # To build the docker container, run: $ sudo docker build -t openacc-labs:latest .
  3. # To run: $ sudo docker run --rm -it --runtime nvidia -p 8888:8888 openacc-labs:latest
  4. # Finally, open http://localhost:8888/
  5. FROM nvcr.io/nvidia/nvhpc:20.9-devel-ubuntu20.04
  6. RUN apt-get -y update && \
  7. DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends python3-pip python3-setuptools nginx zip make build-essential && \
  8. rm -rf /var/lib/apt/lists/* && \
  9. pip3 install --no-cache-dir jupyter &&\
  10. mkdir -p /home/openacc/labs
  11. ############################################
  12. # NVIDIA nsight-systems-2020.5.1 ,nsight-compute-2
  13. RUN apt-get update -y && \
  14. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  15. apt-transport-https \
  16. ca-certificates \
  17. gnupg \
  18. wget && \
  19. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80 && \
  20. echo "deb https://developer.download.nvidia.com/devtools/repos/ubuntu2004/amd64/ /" >> /etc/apt/sources.list.d/nsight.list &&\
  21. apt-get update -y
  22. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.5.1 nsight-compute-2020.2.1
  23. #################################################
  24. ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/lib64/"
  25. ENV PATH="/opt/nvidia/nsight-systems/2020.5.1/bin:/opt/nvidia/nsight-compute/2020.2.1:/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/include:$PATH"
  26. #################################################
  27. ADD nways_labs/ /labs
  28. WORKDIR /labs
  29. CMD service nginx start && jupyter notebook --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs