Dockerfile 2.5 KB

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