From 95f7f99576e0540fdf0b2e4847ef367971c0df05 Mon Sep 17 00:00:00 2001 From: Eric Harper Date: Tue, 7 Mar 2023 18:22:55 -0700 Subject: [PATCH] update commit (#6148) Signed-off-by: ericharper --- Dockerfile | 60 +++++++++++++++++++++++++++--------------------------- README.rst | 4 ++-- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index a81d3748e079..bb3a43adb26a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,23 +31,23 @@ ARG REQUIRE_K2=false ENV DEBIAN_FRONTEND=noninteractive # libavdevice-dev rerquired for latest torchaudio RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y \ - libsndfile1 sox \ - libfreetype6 \ - swig \ - ffmpeg \ - libavdevice-dev && \ - rm -rf /var/lib/apt/lists/* + apt-get upgrade -y && \ + apt-get install -y \ + libsndfile1 sox \ + libfreetype6 \ + swig \ + ffmpeg \ + libavdevice-dev && \ + rm -rf /var/lib/apt/lists/* WORKDIR /tmp/ # TODO: Remove once this Apex commit (1/19/23) is included in PyTorch # container RUN git clone https://github.com/NVIDIA/apex.git && \ - cd apex && \ - git checkout c0a0b0f69d2d5a98bd141be12ee8e5eebd3ec7ca && \ - pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_layer_norm" --global-option="--distributed_adam" --global-option="--deprecated_fused_adam" ./ + cd apex && \ + git checkout a32d7a6dddcf4e39d241b0d139c222a97c91887d && \ + pip3 install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_layer_norm" --global-option="--distributed_adam" --global-option="--deprecated_fused_adam" ./ # uninstall stuff from base container RUN pip3 uninstall -y sacrebleu torchtext @@ -56,13 +56,13 @@ RUN pip3 uninstall -y sacrebleu torchtext WORKDIR /tmp/torchaudio_build COPY scripts/installers /tmp/torchaudio_build/scripts/installers/ RUN INSTALL_MSG=$(/bin/bash /tmp/torchaudio_build/scripts/installers/install_torchaudio_latest.sh); INSTALL_CODE=$?; \ - echo ${INSTALL_MSG}; \ - if [ ${INSTALL_CODE} -ne 0 ]; then \ - echo "torchaudio installation failed"; \ - if [ "${REQUIRE_TORCHAUDIO}" = true ]; then \ - exit ${INSTALL_CODE}; \ - else echo "Skipping failed torchaudio installation"; fi \ - else echo "torchaudio installed successfully"; fi + echo ${INSTALL_MSG}; \ + if [ ${INSTALL_CODE} -ne 0 ]; then \ + echo "torchaudio installation failed"; \ + if [ "${REQUIRE_TORCHAUDIO}" = true ]; then \ + exit ${INSTALL_CODE}; \ + else echo "Skipping failed torchaudio installation"; fi \ + else echo "torchaudio installed successfully"; fi # install nemo dependencies WORKDIR /tmp/nemo @@ -76,13 +76,13 @@ RUN /bin/bash /tmp/nemo/install_pynini.sh # install k2, skip if installation fails COPY scripts /tmp/nemo/scripts/ RUN INSTALL_MSG=$(/bin/bash /tmp/nemo/scripts/speech_recognition/k2/setup.sh); INSTALL_CODE=$?; \ - echo ${INSTALL_MSG}; \ - if [ ${INSTALL_CODE} -ne 0 ]; then \ - echo "k2 installation failed"; \ - if [ "${REQUIRE_K2}" = true ]; then \ - exit ${INSTALL_CODE}; \ - else echo "Skipping failed k2 installation"; fi \ - else echo "k2 installed successfully"; fi + echo ${INSTALL_MSG}; \ + if [ ${INSTALL_CODE} -ne 0 ]; then \ + echo "k2 installation failed"; \ + if [ "${REQUIRE_K2}" = true ]; then \ + exit ${INSTALL_CODE}; \ + else echo "Skipping failed k2 installation"; fi \ + else echo "k2 installed successfully"; fi # copy nemo source into a scratch image FROM scratch as nemo-src @@ -95,16 +95,16 @@ ARG NEMO_VERSION=1.16.0 # Check that NEMO_VERSION is set. Build will fail without this. Expose NEMO and base container # version information as runtime environment variable for introspection purposes RUN /usr/bin/test -n "$NEMO_VERSION" && \ - /bin/echo "export NEMO_VERSION=${NEMO_VERSION}" >> /root/.bashrc && \ - /bin/echo "export BASE_IMAGE=${BASE_IMAGE}" >> /root/.bashrc + /bin/echo "export NEMO_VERSION=${NEMO_VERSION}" >> /root/.bashrc && \ + /bin/echo "export BASE_IMAGE=${BASE_IMAGE}" >> /root/.bashrc # Install NeMo RUN --mount=from=nemo-src,target=/tmp/nemo cd /tmp/nemo && pip install ".[all]" # Check install RUN python -c "import nemo.collections.nlp as nemo_nlp" && \ - python -c "import nemo.collections.tts as nemo_tts" && \ - python -c "import nemo_text_processing.text_normalization as text_normalization" + python -c "import nemo.collections.tts as nemo_tts" && \ + python -c "import nemo_text_processing.text_normalization as text_normalization" # TODO: Update to newer numba 0.56.0RC1 for 22.03 container if possible # install pinned numba version @@ -123,7 +123,7 @@ COPY tutorials /workspace/nemo/tutorials # COPY README.rst LICENSE /workspace/nemo/ RUN printf "#!/bin/bash\njupyter lab --no-browser --allow-root --ip=0.0.0.0" >> start-jupyter.sh && \ - chmod +x start-jupyter.sh + chmod +x start-jupyter.sh # Prepare AIS CLI ARG AIS_VERSION=v1.3.15 diff --git a/README.rst b/README.rst index be9aa4dfa91d..e05b9d135be7 100644 --- a/README.rst +++ b/README.rst @@ -226,9 +226,9 @@ Install it manually if not using the NVIDIA PyTorch container. .. code-block:: bash - git clone https://github.com/ericharper/apex.git + git clone https://github.com/NVIDIA/apex.git cd apex - git checkout nm_v1.15.0 + git checkout a32d7a6dddcf4e39d241b0d139c222a97c91887d pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --global-option="--fast_layer_norm" --global-option="--distributed_adam" --global-option="--deprecated_fused_adam" ./ Transformer Engine