Dockerfile 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright 2021-2024 NVIDIA CORPORATION
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. # http://www.apache.org/licenses/LICENSE-2.0
  6. # Unless required by applicable law or agreed to in writing, software
  7. # distributed under the License is distributed on an "AS IS" BASIS,
  8. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. # See the License for the specific language governing permissions and
  10. # limitations under the License.
  11. #SPDX-License-Identifier: Apache-2.0
  12. ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:22.12-py3
  13. FROM ${FROM_IMAGE_NAME}
  14. ENV DEBIAN_FRONTEND=noninteractive
  15. ENV DCGM_VERSION=2.2.9
  16. ENV MODEL_NAVIGATOR_CONTAINER=1
  17. ENV DGLBACKEND=pytorch
  18. RUN apt-get update && \
  19. apt-get install --no-install-recommends -y software-properties-common curl python3-dev python3-pip python-is-python3 libb64-dev wget git wkhtmltopdf && \
  20. \
  21. curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
  22. add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" && \
  23. apt-get update && \
  24. apt-get install --no-install-recommends -y docker-ce docker-ce-cli containerd.io && \
  25. \
  26. . /etc/os-release && \
  27. curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey| apt-key add - && \
  28. curl -s -L "https://nvidia.github.io/nvidia-docker/${ID}${VERSION_ID}/nvidia-docker.list" > /etc/apt/sources.list.d/nvidia-docker.list && \
  29. apt-get update && \
  30. apt-get install --no-install-recommends -y nvidia-docker2 && \
  31. \
  32. curl -s -L -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/datacenter-gpu-manager_${DCGM_VERSION}_amd64.deb && \
  33. dpkg -i datacenter-gpu-manager_${DCGM_VERSION}_amd64.deb && \
  34. rm datacenter-gpu-manager_${DCGM_VERSION}_amd64.deb && \
  35. \
  36. apt-get clean && \
  37. rm -rf /var/lib/apt/lists/*
  38. RUN apt-get update && \
  39. apt-get install -y libb64-dev libb64-0d curl && \
  40. apt-get clean && \
  41. rm -rf /var/lib/apt/lists/*
  42. WORKDIR /workspace
  43. ENV PYTHONPATH /workspace
  44. RUN rm /usr/lib/libxgboost.so
  45. ADD requirements.txt /workspace/requirements.txt
  46. ADD triton/requirements.txt /workspace/triton/requirements.txt
  47. RUN pip install -r /workspace/requirements.txt
  48. RUN pip install -r /workspace/triton/requirements.txt
  49. RUN pip install nvidia-pyindex
  50. RUN pip install git+https://github.com/NVIDIA/dllogger#egg=dllogger
  51. RUN pip install --no-cache-dir -r requirements.txt
  52. RUN pip install dgl==1.0.1 -f https://data.dgl.ai/wheels/cu117/repo.html
  53. ADD ./hydra_plugins /workspace/hydra_plugins
  54. RUN pip install /workspace/hydra_plugins/hydra_optuna_sweeper/
  55. RUN pip install /workspace/hydra_plugins/hydra_joblib_launcher/
  56. RUN pip install /workspace/hydra_plugins/hydra_multiprocessing_launcher/
  57. RUN pip install /workspace/hydra_plugins/hydra_torchrun_launcher/
  58. RUN cp /workspace/hydra_plugins/optuna_sweeper.py /usr/local/lib/python3.8/dist-packages/hydra/plugins/sweeper.py
  59. ADD . /workspace
  60. RUN rm -rf examples docker-examples tutorials