From 8535a3b198677fa901d44a485f2432d8b5f20af3 Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki <39967756+JanuszL@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:42:52 +0100 Subject: [PATCH] Normalize wheels and sdist names to have only `_` as PEP 625 asks (#5750) - makes sure that nvidia-dali-tf-plugin-cuda110-1.44.0.tar.gz is using the normalized name nvidia_dali_tf_plugin_cuda110-1.44.0.tar.gz Signed-off-by: Janusz Lisiecki --- docker/Dockerfile.make_sdist_plugins | 2 +- docker/Dockerfile_dali_tf | 2 +- qa/TL0_tensorflow_plugin/test.sh | 6 +++--- qa/TL0_video_plugin/test.sh | 2 +- qa/TL1_tensorflow-dali_test/test.sh | 6 +++--- qa/TL1_tensorflow_dataset/test_impl.sh | 6 +++--- qa/test_template_impl.sh | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docker/Dockerfile.make_sdist_plugins b/docker/Dockerfile.make_sdist_plugins index 57b71da01e7..fe4a50ba2e5 100644 --- a/docker/Dockerfile.make_sdist_plugins +++ b/docker/Dockerfile.make_sdist_plugins @@ -4,7 +4,7 @@ FROM ${BASE_IMAGE} ARG DEBIAN_FRONTEND=noninteractive RUN apt update && apt install -y python3 python3-pip build-essential cmake git && \ - python3 -m pip install setuptools scikit-build && \ + python3 -m pip install "setuptools>=70" scikit-build && \ rm -rf /var/lib/apt/lists/* && \ rm -rf /root/.cache/pip/ diff --git a/docker/Dockerfile_dali_tf b/docker/Dockerfile_dali_tf index c247d12a835..8e648157214 100644 --- a/docker/Dockerfile_dali_tf +++ b/docker/Dockerfile_dali_tf @@ -12,7 +12,7 @@ ENV DALI_TIMESTAMP=${DALI_TIMESTAMP} ARG NVIDIA_BUILD_ID ENV NVIDIA_BUILD_ID ${NVIDIA_BUILD_ID:-0} -RUN mkdir /dali_tf_sdist && chmod 0777 /dali_tf_sdist +RUN mkdir /dali_tf_sdist && chmod 0777 /dali_tf_sdist && python3 -m pip install "setuptools>=70" COPY Acknowledgements.txt . COPY COPYRIGHT . diff --git a/qa/TL0_tensorflow_plugin/test.sh b/qa/TL0_tensorflow_plugin/test.sh index 0f4ef097a46..e5fccdcc48b 100755 --- a/qa/TL0_tensorflow_plugin/test.sh +++ b/qa/TL0_tensorflow_plugin/test.sh @@ -15,21 +15,21 @@ else fi test_body() { - # The package name can be nvidia-dali-tf-plugin, nvidia-dali-tf-plugin-weekly or nvidia-dali-tf-plugin-nightly + # The package name can be nvidia_dali_tf_plugin, nvidia_dali_tf_plugin-weekly or nvidia_dali_tf_plugin-nightly pip uninstall -y `pip list | grep nvidia-dali-tf-plugin | cut -d " " -f1` || true # No plugin installed, should fail ${python_invoke_test} test_dali_tf_plugin.py:TestDaliTfPluginLoadFail # Installing "current" dali tf (built against installed TF) - pip install ../../../nvidia-dali-tf-plugin*.tar.gz + pip install ../../../nvidia_dali_tf_plugin*.tar.gz ${python_invoke_test} test_dali_tf_plugin.py:TestDaliTfPluginLoadOk # Installing "current" dali tf (built against installed TF) - force rebuild without DALI using internal stubs # and then install DALI again pip uninstall -y `pip list | grep nvidia-dali-tf-plugin | cut -d " " -f1` || true pip uninstall -y `pip list | grep nvidia-dali | cut -d " " -f1` || true - DALI_TF_ALWAYS_BUILD=1 pip install --no-deps ../../../nvidia-dali-tf-plugin*.tar.gz + DALI_TF_ALWAYS_BUILD=1 pip install --no-deps ../../../nvidia_dali_tf_plugin*.tar.gz pip install ../../../nvidia_dali_*.whl ${python_invoke_test} test_dali_tf_plugin.py:TestDaliTfPluginLoadOk diff --git a/qa/TL0_video_plugin/test.sh b/qa/TL0_video_plugin/test.sh index fc030e0591d..ead742ebac4 100755 --- a/qa/TL0_video_plugin/test.sh +++ b/qa/TL0_video_plugin/test.sh @@ -22,7 +22,7 @@ test_body() { pip uninstall -y `pip list | grep nvidia-dali-video | cut -d " " -f1` || true # Installing the video plugin - pip install -v ../../../nvidia-dali-video*.tar.gz + pip install -v ../../../nvidia_dali_video*.tar.gz # Check that the plugin can be loaded ${python_invoke_test} test_dali_video_plugin.py:TestDaliVideoPluginLoadOk diff --git a/qa/TL1_tensorflow-dali_test/test.sh b/qa/TL1_tensorflow-dali_test/test.sh index 12d9b1959e9..fe0a5a28339 100644 --- a/qa/TL1_tensorflow-dali_test/test.sh +++ b/qa/TL1_tensorflow-dali_test/test.sh @@ -21,10 +21,10 @@ do_once() { install_pip_pkg "pip install $($topdir/qa/setup_packages.py -i 0 -u tensorflow-gpu --cuda ${CUDA_VERSION}) -f /pip-packages" fi - # The package name can be nvidia-dali-tf-plugin, nvidia-dali-tf-plugin-weekly or nvidia-dali-tf-plugin-nightly - pip uninstall -y `pip list | grep nvidia-dali-tf-plugin | cut -d " " -f1` || true + # The package name can be nvidia_dali_tf_plugin, nvidia_dali_tf_plugin-weekly or nvidia_dali_tf_plugin-nightly + pip uninstall -y `pip list | grep nvidia_dali_tf_plugin | cut -d " " -f1` || true - pip install /opt/dali/nvidia-dali-tf-plugin*.tar.gz + pip install /opt/dali/nvidia_dali_tf_plugin*.tar.gz export PATH=$PATH:/usr/local/mpi/bin # MPI might be present in CUDA 10 image already so no need to build it if that is the case diff --git a/qa/TL1_tensorflow_dataset/test_impl.sh b/qa/TL1_tensorflow_dataset/test_impl.sh index aae4b015fab..2b5eed10047 100755 --- a/qa/TL1_tensorflow_dataset/test_impl.sh +++ b/qa/TL1_tensorflow_dataset/test_impl.sh @@ -4,11 +4,11 @@ pip_packages='${python_test_runner_package} jupyter tensorflow-gpu' target_dir=./dali/test/python test_body() { - # The package name can be nvidia-dali-tf-plugin, nvidia-dali-tf-plugin-weekly or nvidia-dali-tf-plugin-nightly - pip uninstall -y `pip list | grep nvidia-dali-tf-plugin | cut -d " " -f1` || true + # The package name can be nvidia_dali_tf_plugin, nvidia_dali_tf_plugin-weekly or nvidia_dali_tf_plugin-nightly + pip uninstall -y `pip list | grep nvidia_dali_tf_plugin | cut -d " " -f1` || true # Installing "current" dali tf (built against installed TF) - pip install ../../../nvidia-dali-tf-plugin*.tar.gz + pip install ../../../nvidia_dali_tf_plugin*.tar.gz is_compatible=$(python -c 'import nvidia.dali.plugin.tf as dali_tf; print(dali_tf.dataset_compatible_tensorflow())') if [ $is_compatible = 'True' ]; then diff --git a/qa/test_template_impl.sh b/qa/test_template_impl.sh index 2ccc5b9cc82..55f298290f8 100755 --- a/qa/test_template_impl.sh +++ b/qa/test_template_impl.sh @@ -181,7 +181,7 @@ do pip uninstall -y `pip list | grep nvidia-dali | cut -d " " -f1` || true pip install /opt/dali/nvidia_dali*.whl; fi - pip install /opt/dali/nvidia-dali-tf-plugin*.tar.gz + pip install /opt/dali/nvidia_dali_tf_plugin*.tar.gz fi # if we are using any cuda or nvidia-tensorflow wheels (nvidia-npp, nvidia-nvjpeg or nvidia-cufft) # unset LD_LIBRARY_PATH to not used cuda from /usr/local/ but from wheels