diff --git a/.github/workflows/run-docker-image.yml b/.github/workflows/run-docker-image.yml index d0ac11071..12604a132 100644 --- a/.github/workflows/run-docker-image.yml +++ b/.github/workflows/run-docker-image.yml @@ -25,12 +25,23 @@ jobs: uses: addnab/docker-run-action@v3 with: image: k2fsa/icefall:${{ matrix.image }} + shell: bash run: | uname -a cat /etc/*release nvcc --version + # For torch1.9.0-cuda10.2 + export LD_LIBRARY_PATH=/usr/local/cuda-10.2/compat:$LD_LIBRARY_PATH + + # For torch1.12.1-cuda11.3 + export LD_LIBRARY_PATH=/usr/local/cuda-11.3/compat:$LD_LIBRARY_PATH + + # For torch2.0.0-cuda11.7 + export LD_LIBRARY_PATH=/usr/local/cuda-11.7/compat:$LD_LIBRARY_PATH + + which nvcc cuda_dir=$(dirname $(which nvcc)) echo "cuda_dir: $cuda_dir" @@ -40,20 +51,26 @@ jobs: find / -name libcuda.so* 2>/dev/null - pushd /opt/conda/lib/stubs && ln -s libcuda.so libcuda.so.1 && popd + # for torch1.13.0-cuda11.6 + if [ -e /opt/conda/lib/stubs/libcuda.so ]; then + cd /opt/conda/lib/stubs && ln -s libcuda.so libcuda.so.1 && cd - + export LD_LIBRARY_PATH=/opt/conda/lib/stubs:$LD_LIBRARY_PATH + fi - export LD_LIBRARY_PATH=/opt/conda/lib/stubs:$LD_LIBRARY_PATH - echo "LD_LIBRARY_PATH $LD_LIBRARY_PATH" + find / -name libcuda.so* 2>/dev/null + echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" python3 --version which python3 + python3 -m pip list + echo "----------torch----------" python3 -m torch.utils.collect_env echo "----------k2----------" python3 -c "import k2; print(k2.__file__)" - python3 -c "import k2; print(k2.__version__)" + python3 -c "import k2; print(k2.__dev_version__)" python3 -m k2.version echo "----------lhotse----------" @@ -64,3 +81,12 @@ jobs: python3 -c "import kaldifeat; print(kaldifeat.__file__)" python3 -c "import kaldifeat; print(kaldifeat.__version__)" + echo "Test yesno recipe" + + cd egs/yesno/ASR + + ./prepare.sh + + ./tdnn/train.py + + ./tdnn/decode.py diff --git a/docker/torch1.12.1-cuda11.3.dockerfile b/docker/torch1.12.1-cuda11.3.dockerfile index c5e252abb..5338bdca7 100644 --- a/docker/torch1.12.1-cuda11.3.dockerfile +++ b/docker/torch1.12.1-cuda11.3.dockerfile @@ -1,4 +1,4 @@ -FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime +FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-devel ENV LC_ALL C.UTF-8 @@ -51,7 +51,15 @@ RUN pip install --no-cache-dir \ sentencepiece>=0.1.96 \ tensorboard \ typeguard \ - dill + dill \ + onnx \ + onnxruntime \ + onnxmltools \ + multi_quantization \ + typeguard \ + numpy \ + pytest \ + graphviz RUN git clone https://github.com/k2-fsa/icefall /workspace/icefall && \ cd /workspace/icefall && \ diff --git a/docker/torch1.13.0-cuda11.6.dockerfile b/docker/torch1.13.0-cuda11.6.dockerfile index bcbf8b599..4d2f96c8e 100644 --- a/docker/torch1.13.0-cuda11.6.dockerfile +++ b/docker/torch1.13.0-cuda11.6.dockerfile @@ -51,7 +51,15 @@ RUN pip install --no-cache-dir \ sentencepiece>=0.1.96 \ tensorboard \ typeguard \ - dill + dill \ + onnx \ + onnxruntime \ + onnxmltools \ + multi_quantization \ + typeguard \ + numpy \ + pytest \ + graphviz RUN git clone https://github.com/k2-fsa/icefall /workspace/icefall && \ cd /workspace/icefall && \ diff --git a/docker/torch1.9.0-cuda10.2.dockerfile b/docker/torch1.9.0-cuda10.2.dockerfile index 7553fcf86..a7cef6dc8 100644 --- a/docker/torch1.9.0-cuda10.2.dockerfile +++ b/docker/torch1.9.0-cuda10.2.dockerfile @@ -1,4 +1,4 @@ -FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime +FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel ENV LC_ALL C.UTF-8 @@ -13,6 +13,13 @@ LABEL k2_version=${K2_VERSION} LABEL kaldifeat_version=${KALDIFEAT_VERSION} LABEL github_repo="https://github.com/k2-fsa/icefall" +# see https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/ + +RUN rm /etc/apt/sources.list.d/cuda.list && \ + rm /etc/apt/sources.list.d/nvidia-ml.list && \ + apt-key del 7fa2af80 + + RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl \ @@ -37,8 +44,15 @@ RUN apt-get update && \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* +RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb && \ + dpkg -i cuda-keyring_1.0-1_all.deb && \ + rm -v cuda-keyring_1.0-1_all.deb && \ + apt-get update && \ + rm -rf /var/lib/apt/lists/* + # Install dependencies -RUN pip install --no-cache-dir \ +RUN pip uninstall -y tqdm && \ + pip install -U --no-cache-dir \ torchaudio==${TORCHAUDIO_VERSION} -f https://download.pytorch.org/whl/torch_stable.html \ k2==${K2_VERSION} -f https://k2-fsa.github.io/k2/cuda.html \ kaldifeat==${KALDIFEAT_VERSION} -f https://csukuangfj.github.io/kaldifeat/cuda.html \ @@ -51,7 +65,17 @@ RUN pip install --no-cache-dir \ sentencepiece>=0.1.96 \ tensorboard \ typeguard \ - dill + dill \ + onnx \ + onnxruntime \ + onnxmltools \ + multi_quantization \ + typeguard \ + numpy \ + pytest \ + graphviz \ + tqdm>=4.63.0 + RUN git clone https://github.com/k2-fsa/icefall /workspace/icefall && \ cd /workspace/icefall && \ diff --git a/docker/torch2.0.0-cuda11.7.dockerfile b/docker/torch2.0.0-cuda11.7.dockerfile index c11c0bd67..d91fbc24f 100644 --- a/docker/torch2.0.0-cuda11.7.dockerfile +++ b/docker/torch2.0.0-cuda11.7.dockerfile @@ -1,4 +1,4 @@ -FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime +FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-devel ENV LC_ALL C.UTF-8 @@ -51,7 +51,15 @@ RUN pip install --no-cache-dir \ sentencepiece>=0.1.96 \ tensorboard \ typeguard \ - dill + dill \ + onnx \ + onnxruntime \ + onnxmltools \ + multi_quantization \ + typeguard \ + numpy \ + pytest \ + graphviz RUN git clone https://github.com/k2-fsa/icefall /workspace/icefall && \ cd /workspace/icefall && \