Dockerfile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. #
  15. # author: Tomasz Grel ([email protected])
  16. ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:23.06-tf2-py3
  17. FROM nvcr.io/nvidia/tritonserver:23.06-py3-sdk as clientsdk
  18. FROM ${FROM_IMAGE_NAME} as base
  19. ARG DISTRIBUTED_EMBEDDINGS_COMMIT=45cffaa8
  20. WORKDIR /dlrm
  21. RUN apt update && apt install -y libb64-dev tree
  22. ADD requirements.txt .
  23. RUN pip install --upgrade pip && pip install -r requirements.txt
  24. RUN rm -rf distributed-embeddings &&\
  25. git clone https://github.com/NVIDIA-Merlin/distributed-embeddings.git &&\
  26. cd distributed-embeddings &&\
  27. git checkout ${DISTRIBUTED_EMBEDDINGS_COMMIT} &&\
  28. git submodule init && git submodule update &&\
  29. pip uninstall -y distributed-embeddings &&\
  30. make clean &&\
  31. make pip_pkg -j all &&\
  32. pip install artifacts/*.whl &&\
  33. cd ..
  34. ADD tensorflow-dot-based-interact tensorflow-dot-based-interact
  35. RUN mkdir -p /usr/local/lib/python3.8/dist-packages/tensorflow/include/third_party/gpus/cuda/ &&\
  36. cd tensorflow-dot-based-interact &&\
  37. make clean &&\
  38. pip uninstall -y tensorflow-dot-based-interact &&\
  39. make &&\
  40. make pkg &&\
  41. pip install ./artifacts/tensorflow_dot_based_interact-*.whl &&\
  42. cd ..
  43. COPY --from=clientsdk /workspace/install/python/tritonclient-2.35.0-py3-*.whl /dlrm/
  44. RUN if [[ "$(uname -m)" == "x86_64" ]]; \
  45. then echo x86; pip install tritonclient-2.35.0-py3-none-manylinux1_x86_64.whl[all]; \
  46. else echo arm; pip install tritonclient-2.35.0-py3-none-manylinux2014_aarch64.whl[all]; \
  47. fi
  48. ADD . .
  49. ENV HOROVOD_CYCLE_TIME=0.2
  50. ENV HOROVOD_ENABLE_ASYNC_COMPLETION=1