Dockerfile_python 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 nvidia/cuda:11.2.2-devel-ubuntu20.04
  7. RUN apt-get -y update && \
  8. DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends \
  9. python3-dev \
  10. python3-pip python3-setuptools nginx zip make build-essential libtbb-dev && \
  11. rm -rf /var/lib/apt/lists/*
  12. RUN pip3 install --no-cache-dir -U install setuptools pip
  13. RUN pip3 install gdown
  14. RUN pip3 install --no-cache-dir jupyter
  15. RUN pip3 install --no-cache-dir "cupy-cuda112==8.6.0" \
  16. numba numpy scipy
  17. ############################################
  18. # NVIDIA nsight-systems-2020.5.1 ,nsight-compute-2
  19. RUN apt-get update -y && \
  20. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  21. apt-transport-https \
  22. ca-certificates \
  23. gnupg \
  24. wget && \
  25. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80 && \
  26. echo "deb https://developer.download.nvidia.com/devtools/repos/ubuntu2004/amd64/ /" >> /etc/apt/sources.list.d/nsight.list &&\
  27. apt-get update -y
  28. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.5.1 nsight-compute-2020.2.1
  29. # TO COPY the data
  30. COPY nways_labs/ /labs/
  31. RUN python3 /labs/nways_MD/English/Python/source_code/dataset.py
  32. #################################################
  33. ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/python3.8/dist-packages:/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
  34. ENV PATH="/opt/nvidia/nsight-systems/2020.5.1/bin:/opt/nvidia/nsight-compute/2020.2.1:/usr/local/bin:/bin:/usr/local/cuda/bin:/usr/bin${PATH:+:${PATH}}"
  35. RUN pip3 install --no-cache-dir MDAnalysis
  36. ADD nways_labs/ /labs
  37. WORKDIR /labs
  38. CMD service nginx start && jupyter notebook --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs