Dockerfile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
  2. # To build: $ sudo docker build -t nvidia_nsight_profiling_openacc:latest .
  3. # To run: $ sudo docker run --rm -it --gpus=all -p 8888:8888 nvidia_nsight_profiling_openacc:latest
  4. # Finally, open http://127.0.0.1:8888/
  5. FROM nvcr.io/nvidia/nvhpc:20.9-devel-ubuntu20.04
  6. RUN apt-get update -y && \
  7. apt-get dist-upgrade -y && \
  8. DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends \
  9. m4 vim-nox emacs-nox nano zip\
  10. python3-pip python3-setuptools git-core inotify-tools \
  11. curl git-lfs nginx\
  12. build-essential openssh-server openssh-client && \
  13. rm -rf /var/lib/apt/cache/*
  14. RUN apt-get update
  15. RUN apt-get install --no-install-recommends -y python3
  16. RUN pip3 install --upgrade pip
  17. RUN apt-get update -y
  18. RUN apt-get install -y git nvidia-modprobe
  19. RUN pip3 install jupyterlab
  20. # Install required python packages
  21. RUN pip3 install ipywidgets
  22. RUN pip3 install netcdf4
  23. # NVIDIA nsight-systems-2020.2.1
  24. RUN apt-get update -y && \
  25. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  26. apt-transport-https \
  27. ca-certificates \
  28. gnupg \
  29. wget && \
  30. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80 && \
  31. echo "deb https://developer.download.nvidia.com/devtools/repo-deb/x86_64/ /" >> /etc/apt/sources.list.d/nsight.list && \
  32. apt-get update -y
  33. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.2.1
  34. RUN apt-get install --no-install-recommends -y build-essential
  35. ENV PATH="$PATH:/usr/local/bin:/opt/anaconda3/bin:/usr/bin"
  36. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
  37. bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/anaconda3 && \
  38. rm Miniconda3-latest-Linux-x86_64.sh && \
  39. /opt/anaconda3/bin/conda install -y -q netcdf4
  40. ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib:/opt/nvidia/hpc_sdk/Linux_x86_64/20.9/cuda/11.0/lib64/"
  41. ENV PATH="/opt/nvidia/nsight-systems/2020.2.1/bin:$PATH"
  42. ADD English/ /labs
  43. WORKDIR /labs
  44. CMD jupyter-lab --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs