Dockerfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright (c) 2018, 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. ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:21.05-py3
  15. FROM ${FROM_IMAGE_NAME}
  16. WORKDIR /workspace
  17. #RUN git clone https://github.com/NVIDIA/apex \
  18. # && cd apex \
  19. # && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
  20. # Install Python dependencies
  21. RUN pip install --no-cache-dir \
  22. sacrebleu \
  23. sentencepiece
  24. RUN pip install jupyter
  25. ARG DEBIAN_FRONTEND=noninteractive
  26. RUN apt-get update
  27. RUN apt-get install -y -q cmake pkg-config protobuf-compiler libprotobuf-dev libgoogle-perftools-dev
  28. RUN git clone https://github.com/google/sentencepiece.git /workspace/sentencepiece
  29. RUN cd /workspace/sentencepiece \
  30. && git checkout d4dd947 \
  31. && mkdir build \
  32. && cd build \
  33. && cmake .. \
  34. && make -j 8 \
  35. && make install \
  36. && ldconfig -v
  37. ENV PYTHONPATH=/workspace/translation/examples/translation/subword-nmt/
  38. WORKDIR /workspace/translation
  39. RUN git clone https://github.com/rsennrich/subword-nmt.git /workspace/translation/examples/translation/subword-nmt/
  40. RUN git clone https://github.com/NVIDIA/cutlass.git && cd cutlass && git checkout ed2ed4d6 && cd ..
  41. COPY . .
  42. RUN pip install -e .
  43. RUN pip install git+https://github.com/NVIDIA/[email protected]#egg=dllogger