Skip to content

Commit

Permalink
[tensorflow-addons] Fix Build & Hardcoded References to Python 3.8
Browse files Browse the repository at this point in the history
tensorflow-addons was failing to build due to the outdated version of
Pyinstaller provided by the base-builder image. This upgrades
Pyinstaller to the latest version known to work, and updates a hardcoded
path pointing to Python 3.8 now that the base-builder image installs
Python 3.10.
  • Loading branch information
DaveLak committed Jun 4, 2024
1 parent 7ab3ab6 commit eed2bea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions projects/tensorflow-addons/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
rsync

RUN python3 -m pip install --upgrade pip chardet

# Due to Bazel bug, need to symlink python3 to python
# See https://github.com/bazelbuild/bazel/issues/8665
RUN ln -s /usr/local/bin/python3 /usr/local/bin/python
RUN python3 -m pip install --upgrade chardet 'pyinstaller==6.7.0'

# Install Bazelisk to keep bazel in sync with the version required by TensorFlow
RUN curl -Lo /usr/bin/bazel \
Expand Down
2 changes: 1 addition & 1 deletion projects/tensorflow-addons/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ bazel-bin/build_pip_pkg artifacts
python3 -m pip install artifacts/tensorflow_addons-*.whl

for fuzzer in $(find $SRC -name 'fuzz_*.py'); do
compile_python_fuzzer $fuzzer --add-data '/usr/local/lib/python3.8/site-packages/tensorflow_addons/custom_ops/text/:tensorflow_addons/custom_ops/text/'
compile_python_fuzzer $fuzzer --add-data '/usr/local/lib/python3.10/site-packages/tensorflow_addons/custom_ops/text/:tensorflow_addons/custom_ops/text/'
done

0 comments on commit eed2bea

Please sign in to comment.