Skip to content

Commit

Permalink
Normalize wheels and sdist names to have only _ as PEP 625 asks (#5750
Browse files Browse the repository at this point in the history
)

- 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 <[email protected]>
  • Loading branch information
JanuszL authored Dec 17, 2024
1 parent f6e2c00 commit 8535a3b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.make_sdist_plugins
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_dali_tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
6 changes: 3 additions & 3 deletions qa/TL0_tensorflow_plugin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion qa/TL0_video_plugin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions qa/TL1_tensorflow-dali_test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions qa/TL1_tensorflow_dataset/test_impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qa/test_template_impl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8535a3b

Please sign in to comment.