Dockerfile 2.1 KB

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