2019-01-23 17:03:45 +01:00
|
|
|
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2020-07-04 02:28:25 +02:00
|
|
|
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:20.06-py3
|
2019-07-16 21:13:08 +02:00
|
|
|
FROM ${FROM_IMAGE_NAME}
|
2019-01-23 17:03:45 +01:00
|
|
|
|
2019-08-13 15:01:10 +02:00
|
|
|
WORKDIR /workspace
|
2020-07-04 02:28:25 +02:00
|
|
|
#RUN git clone https://github.com/NVIDIA/apex \
|
|
|
|
# && cd apex \
|
|
|
|
# && pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./
|
2019-01-23 17:03:45 +01:00
|
|
|
# Install Python dependencies
|
|
|
|
RUN pip install --upgrade --no-cache-dir pip \
|
|
|
|
&& pip install --no-cache-dir \
|
2019-05-27 15:24:14 +02:00
|
|
|
sacrebleu \
|
|
|
|
sentencepiece
|
2020-07-04 02:28:25 +02:00
|
|
|
RUN pip install tensorboardX
|
2019-05-27 15:24:14 +02:00
|
|
|
|
|
|
|
RUN apt-get update
|
2019-07-16 21:13:08 +02:00
|
|
|
RUN apt-get install -y cmake pkg-config protobuf-compiler libprotobuf-dev libgoogle-perftools-dev
|
2019-05-27 15:24:14 +02:00
|
|
|
RUN git clone https://github.com/google/sentencepiece.git /workspace/sentencepiece
|
|
|
|
RUN cd /workspace/sentencepiece \
|
2019-07-16 21:13:08 +02:00
|
|
|
&& git checkout d4dd947 \
|
2019-05-27 15:24:14 +02:00
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make -j 8 \
|
|
|
|
&& make install \
|
|
|
|
&& ldconfig -v
|
|
|
|
|
|
|
|
ENV PYTHONPATH=/workspace/translation/examples/translation/subword-nmt/
|
2019-01-23 17:03:45 +01:00
|
|
|
WORKDIR /workspace/translation
|
|
|
|
RUN git clone https://github.com/rsennrich/subword-nmt.git /workspace/translation/examples/translation/subword-nmt/
|
2020-07-04 02:28:25 +02:00
|
|
|
RUN git clone https://github.com/NVIDIA/cutlass.git && cd cutlass && git checkout ed2ed4d6 && cd ..
|
2019-07-16 21:13:08 +02:00
|
|
|
COPY . .
|
2019-01-23 17:03:45 +01:00
|
|
|
RUN pip install -e .
|
2020-07-04 02:28:25 +02:00
|
|
|
RUN git clone https://github.com/NVIDIA/dllogger.git
|
|
|
|
RUN pip install dllogger/
|