Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Version 0.1alpha2.
Browse files Browse the repository at this point in the history
Release 0.1-alpha2
Fixes several failures in TensorFlow unit tests and other bug fixes.
Resolves #50
Resolves #99
Resolves reported installation issues.
Adds release notes.
  • Loading branch information
pooyadavoodi committed Feb 1, 2021
1 parent 8df2f12 commit 301e41c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This pre-release delivers hardware-accelerated TensorFlow and TensorFlow Addons

### CURRENT RELEASE

- 0.1-alpha1
- 0.1-alpha2

### SUPPORTED VERSIONS

Expand Down
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release 0.1-alpha2

* Fixes several failures in TensorFlow unit tests and other bug fixes.
* Resolves <https://github.com/apple/tensorflow_macos/issues/50>
* Resolves <https://github.com/apple/tensorflow_macos/issues/99>
* Resolves reported installation issues.
* Adds release notes.
2 changes: 1 addition & 1 deletion scripts/download_and_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

VERSION=0.1alpha1
VERSION=0.1alpha2
INSTALLER_PACKAGE=tensorflow_macos-$VERSION.tar.gz
INSTALLER_PATH=https://github.com/apple/tensorflow_macos/releases/download/v$VERSION/$INSTALLER_PACKAGE
INSTALLER_SCRIPT=install_venv.sh
Expand Down
40 changes: 24 additions & 16 deletions scripts/install_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ set -e
arch_list_x86_64=( numpy-1.18.5-cp38-cp38-macosx_11_0_x86_64.whl
grpcio-1.33.2-cp38-cp38-macosx_11_0_x86_64.whl
h5py-2.10.0-cp38-cp38-macosx_11_0_x86_64.whl
scipy-1.5.4-cp38-cp38-macosx_11_0_x86_64.whl
tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_11_0_x86_64.whl )
scipy-1.5.4-cp38-cp38-macosx_11_0_x86_64.whl )

arch_list_arm64=( numpy-1.18.5-cp38-cp38-macosx_11_0_arm64.whl
grpcio-1.33.2-cp38-cp38-macosx_11_0_arm64.whl
h5py-2.10.0-cp38-cp38-macosx_11_0_arm64.whl
tensorflow_addons-0.11.2+mlcompute-cp38-cp38-macosx_11_0_arm64.whl )
h5py-2.10.0-cp38-cp38-macosx_11_0_arm64.whl )


tensorflow_version=0.1a1
tensorflow_version=0.1a2


function usage() {
Expand Down Expand Up @@ -183,7 +181,7 @@ tf_install_message=""

# Now, see if a virtual environment was given as an argument.
if [[ -e $virtual_env ]] ; then
if [[ ! -d "$virtual_env" ]] || [[ ! -e "$virtual_env/bin/activate" ]] ; then
if [[ ! -d "$virtual_env" ]] || [[ ! -e "$virtual_env/bin/python" ]] ; then
error_exit "$virtual_env does not seem to be a virtual environment. Please specify a new directory or an existing Python 3.8 virtual environment. "
fi
create_venv=0
Expand Down Expand Up @@ -307,7 +305,11 @@ if [[ $create_venv == 1 ]] ; then
"$python_bin" -m venv "$virtual_env"
fi

. "$virtual_env/bin/activate"
# Test for existence here -- If it's a conda environment that's already activated, this allows the script to still work.
if [[ -e "$virtual_env/bin/activate" ]] ; then
. "$virtual_env/bin/activate"
fi

python_bin="$virtual_env/bin/python3"

export MACOSX_DEPLOYMENT_TARGET=11.0
Expand All @@ -319,24 +321,27 @@ fi

# Upgrade pip and base packages
echo ">> Installing and upgrading base packages."
"$python_bin" -m pip install --force pip==20.2.4 wheel setuptools cached-property six
"$python_bin" -m pip install --force pip==20.2.4 wheel setuptools cached-property six packaging

echo ">> Installing bundled binary dependencies."

# Note: As soon python packaging supports macOS 11.0 in full, we can remove the -t hackery.
for f in ${packages[@]} ; do
"$python_bin" -m pip install --upgrade -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies --force "$package_dir/$f"
"$python_bin" -m pip install --upgrade -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies --force "$package_dir/$f"
done

# Manually install all the other dependencies.
echo ">> Installing dependencies."
"$python_bin" -m pip install absl-py astunparse flatbuffers gast google_pasta keras_preprocessing opt_einsum protobuf tensorflow_estimator termcolor typing_extensions wrapt wheel tensorboard typeguard

# Install some convenience tools
# Install some convenience tools.
"$python_bin" -m pip install ipython

# Install the tensorflow wheel itself
"$python_bin" -m pip install --upgrade --force -t "$VIRTUAL_ENV/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl
# Install the tensorflow wheel itself.
"$python_bin" -m pip install --upgrade --force -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_macos*-cp38-cp38-macosx_11_0_$arch.whl

# Install the tensorflow-addons wheel.
"$python_bin" -m pip install --upgrade --force -t "$virtual_env/lib/python3.8/site-packages/" --no-dependencies "$package_dir"/tensorflow_addons_macos*-cp38-cp38-macosx_11_0_$arch.whl

# Finally, upgrade pip to give the developers the correct version.
"$python_bin" -m pip install --upgrade pip
Expand All @@ -345,10 +350,13 @@ echo '##########################################################################
echo
echo "TensorFlow and TensorFlow Addons with ML Compute for macOS 11.0 successfully installed."
echo
echo "To begin, activate the virtual environment:"
echo
echo " . \"$virtual_env/bin/activate\" "
echo

if [[ -e "$virtual_env/bin/activate" ]] ; then
echo "To begin, activate the virtual environment:"
echo
echo " . \"$virtual_env/bin/activate\" "
echo
fi



0 comments on commit 301e41c

Please sign in to comment.