Dockerfile_python 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 apt-get update -y
  15. RUN apt-get install -y git nvidia-modprobe
  16. # Install required python packages
  17. RUN pip3 install jupyterlab
  18. RUN pip3 install ipywidgets
  19. RUN pip3 install --upgrade numpy==1.19.5
  20. RUN pip3 install --no-cache-dir "cupy-cuda112==9.0.0" \
  21. numba==0.53.1 scipy
  22. ############################################
  23. # NVIDIA nsight-systems-2020.5.1 ,nsight-compute-2
  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/repos/ubuntu2004/amd64/ /" >> /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-2021.3.1 nsight-compute-2021.2.2
  34. # TO COPY the data
  35. COPY nways_labs/ /labs/
  36. RUN python3 /labs/nways_MD/English/Python/source_code/dataset.py
  37. #################################################
  38. ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/python3.8/dist-packages:/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
  39. ENV PATH="/opt/nvidia/nsight-systems/2021.3.1/bin:/opt/nvidia/nsight-compute/2021.2.2:/usr/local/bin:/bin:/usr/local/cuda/bin:/usr/bin${PATH:+:${PATH}}"
  40. RUN pip3 install --no-cache-dir MDAnalysis
  41. ADD nways_labs/ /labs
  42. WORKDIR /labs
  43. CMD jupyter-lab --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs