Dockerfile_python 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 --no-cache-dir "cupy-cuda112==8.6.0" \
  20. numba numpy scipy
  21. ############################################
  22. # NVIDIA nsight-systems-2020.5.1 ,nsight-compute-2
  23. RUN apt-get update -y && \
  24. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  25. apt-transport-https \
  26. ca-certificates \
  27. gnupg \
  28. wget && \
  29. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F60F4B3D7FA2AF80 && \
  30. echo "deb https://developer.download.nvidia.com/devtools/repos/ubuntu2004/amd64/ /" >> /etc/apt/sources.list.d/nsight.list &&\
  31. apt-get update -y
  32. RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nsight-systems-2020.5.1 nsight-compute-2020.2.1
  33. # TO COPY the data
  34. COPY nways_labs/ /labs/
  35. RUN python3 /labs/nways_MD/English/Python/source_code/dataset.py
  36. #################################################
  37. ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/python3.8/dist-packages:/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
  38. 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}}"
  39. RUN pip3 install --no-cache-dir MDAnalysis
  40. ADD nways_labs/ /labs
  41. WORKDIR /labs
  42. CMD jupyter-lab --no-browser --allow-root --ip=0.0.0.0 --port=8888 --NotebookApp.token="" --notebook-dir=/labs