Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved.
  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. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. # See the License for the specific language governing permissions and
  12. # limitations under the License.
  13. ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:20.06-py3
  14. FROM nvcr.io/nvidia/tritonserver:20.06-v1-py3-clientsdk as trt
  15. FROM ${FROM_IMAGE_NAME}
  16. RUN apt-get update && apt-get install -y pbzip2 pv bzip2 cabextract
  17. ENV BERT_PREP_WORKING_DIR /workspace/bert/data
  18. WORKDIR /workspace
  19. RUN git clone https://github.com/attardi/wikiextractor.git && cd wikiextractor && git checkout 6408a430fc504a38b04d37ce5e7fc740191dee16 && cd ..
  20. RUN git clone https://github.com/soskek/bookcorpus.git
  21. # Copy the perf_client over
  22. COPY --from=trt /workspace/install/ /workspace/install/
  23. ENV LD_LIBRARY_PATH /workspace/install/lib:${LD_LIBRARY_PATH}
  24. # Install trt python api
  25. RUN apt-get install libb64-0d
  26. RUN pip install /workspace/install/python/tensorrtserver*.whl
  27. WORKDIR /workspace/bert
  28. RUN pip install --upgrade --no-cache-dir pip \
  29. && pip install --no-cache-dir \
  30. tqdm boto3 requests six ipdb h5py html2text nltk progressbar onnxruntime \
  31. git+https://github.com/NVIDIA/dllogger wget
  32. RUN apt-get install -y iputils-ping
  33. COPY . .