Dockerfile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright (c) 2020 NVIDIA Corporation. All rights reserved.
  2. # To build: $ sudo docker build -t miniprofiler:latest .
  3. # To run: $ sudo docker run --rm -it --gpus=all -p 8888:8888 miniprofiler:latest
  4. # Finally, open http://127.0.0.1:8888/
  5. FROM nvcr.io/hpc/pgi-compilers:ce
  6. RUN apt-get update -y && \
  7. apt-get dist-upgrade -y && \
  8. apt-get install --no-install-recommends -y \
  9. openssh-server m4 vim-nox emacs-nox nano zip && \
  10. rm -rf /var/lib/apt/cache/*
  11. RUN apt-get update
  12. RUN apt-get install --no-install-recommends -y python3 python3-pip nginx
  13. RUN pip3 install --upgrade pip
  14. RUN apt-get install --no-install-recommends -y python3-setuptools
  15. RUN apt-get install --no-install-recommends -y git-core
  16. RUN apt-get install --no-install-recommends -y openssh-client
  17. RUN apt-get install --no-install-recommends -y inotify-tools
  18. RUN pip3 install jupyter
  19. RUN pip3 install netcdf4
  20. RUN apt-get install --no-install-recommends -y curl
  21. RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
  22. RUN apt-get install --no-install-recommends -y git-lfs
  23. RUN git lfs install
  24. # NVIDIA Nsight Systems
  25. RUN apt-get update -y && \
  26. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  27. apt-transport-https \
  28. ca-certificates \
  29. gnupg \
  30. wget && \
  31. echo "deb https://developer.download.nvidia.com/devtools/repo-deb/x86_64/ /" >> /etc/apt/sources.list.d/nsight.list && \
  32. echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" >> /etc/apt/sources.list.d/nsight.list &&\
  33. apt-get update -y
  34. RUN apt-get update -y
  35. # NVIDIA nsight-systems-2020.2.1 nsight-compute-2020.1.1
  36. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.2.1 nsight-compute-2020.1.1
  37. RUN apt-get install --no-install-recommends -y build-essential
  38. ENV PATH="$PATH:/usr/local/bin:/opt/anaconda3/bin:/usr/bin" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" CPATH="$CPATH:/usr/local/include"
  39. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
  40. bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/anaconda3 && \
  41. rm Miniconda3-latest-Linux-x86_64.sh && \
  42. /opt/anaconda3/bin/conda install -y -q netcdf4
  43. ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/pgi/linux86-64-llvm/2019/cuda/10.1/lib64/"
  44. ENV PATH="$PATH:/opt/nvidia/nsight-systems/2020.2.1/bin:/opt/nvidia/nsight-compute/2020.1.1/"
  45. ADD English/ /labs
  46. WORKDIR /labs
  47. CMD service nginx start && jupyter notebook --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs