Skip to content

Commit 51e7343

Browse files
committed
Update tf-text 2.14.0 & fix typo.
1 parent b00653f commit 51e7343

File tree

4 files changed

+31
-29
lines changed

4 files changed

+31
-29
lines changed

README-zh.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 用于 Apple Silicon 的 TensorFlow 库和扩展
1+
# 用于 Apple 芯片的 TensorFlow 库和扩展
22

33
这个仓库将提供需要编译才能构建的 TensorFlow 库和拓展的构建教程, 同时也提供预编译的`wheel`文件. 本教程提供[简体中文](https://github.com/sun1638650145/Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon/blob/main/README-zh.md)[English](https://github.com/sun1638650145/Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon/blob/main/README.md)支持.
44

@@ -12,4 +12,5 @@
1212
## 注意 ⚠️
1313

1414
*`tensorflow-macos 2.9.0``tensorflow-metal 0.5.0`才开始提供了`Python 3.10`的支持.
15-
*`tensorflow 2.13.0`开始官方提供`Apple Silicon`的支持和`Python 3.11`的支持.
15+
*`tensorflow 2.13.0`开始官方提供`Apple silicon`的支持和`Python 3.11`的支持.
16+
*`tensorflow 2.14.0`开始移除了`Python 3.8`的支持.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ This Repo will provide TensorFlow libraries and extended build tutorials that re
1212
## Note ⚠️
1313

1414
* `Python 3.10` support has been provided since `tensorflow-macos 2.9.0` and `tensorflow-metal 0.5.0`.
15-
* Official support for `Apple Silicon` and `Python 3.11` was introduced starting from `tensorflow 2.13.0`.
15+
* Official support for `Apple silicon` and `Python 3.11` was introduced starting from `tensorflow 2.13.0`.
16+
* Starting from `tensorflow 2.14.0`, support for `Python 3.8` has been removed.

tutorials/text/text-zh.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,54 @@
66

77
## 必要条件
88

9-
这里假设了您有必要的类Unix知识, 已经在您的终端内安装好了[`brew`](https://brew.sh)[`conda`](https://github.com/conda-forge/miniforge), 这里不再赘述`brew``conda`安装和使用方法; 最重要的是, 这个教程完全基于Apple Silicon构建, 所以确保您手中的Mac是Apple Silicon.
9+
这里假设了您有必要的类Unix知识, 已经在您的终端内安装好了[`brew`](https://brew.sh)[`conda`](https://github.com/conda-forge/miniforge), 这里不再赘述`brew``conda`安装和使用方法; 最重要的是, 这个教程完全基于Apple 芯片构建, 所以确保您手中的Mac是Apple 芯片.
1010

1111
## Step by Step
1212

1313
1. 创建新的环境并安装Apple提供的依赖项.
1414

1515
```shell
16-
conda create -n tensorflow-macos python=3.11 # 这里Python版本也可以使用Python 3.8, 3.9和3.10.
16+
conda create -n tensorflow-macos python=3.11 # 这里Python版本也可以使用Python 3.9或3.10.
1717
conda activate tensorflow-macos
1818
```
1919

2020
2. 安装`tensorflow``tensorflow-metal`插件.
2121

2222
```shell
23-
pip install tensorflow==2.13.0 # 从tensorflow 2.13开始官方支持Apple silicon.
24-
pip install tensorflow-metal==1.0.1
23+
pip install tensorflow==2.14.0
24+
pip install tensorflow-metal==1.1.0
2525
```
2626

27-
3. 安装`bazel 5.3.0`.
27+
3. 安装`bazel 6.1.0`.
2828

2929
```shell
30-
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/59dff37de3c670a77c1e9f39b8a4b0f8884a391b/Formula/bazel.rb
30+
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/a9b3083e23806aebe61f7c39d393734a6949eaa5/Formula/bazel.rb
3131
brew install ./bazel.rb
32-
bazel --version # 确保版本是5.3.0即可.
32+
bazel --version # 确保版本是6.1.0即可.
3333
```
3434

3535
* 通常情况下`brew`安装的`bazel`会是最新版的, 最新版往往和`text`要求的版本不匹配, 这可能会出现很多意想不到的问题, 所以我们通过手动指定版本安装.
3636

37-
4. 下载并解压`text 2.13.0`.
37+
4. 下载并解压`text 2.14.0`.
3838

3939
```shell
40-
wget https://github.com/tensorflow/text/archive/refs/tags/v2.13.0.zip
41-
unzip ./v2.13.0.zip
42-
cd text-2.13.0
40+
wget https://github.com/tensorflow/text/archive/refs/tags/v2.14.0.zip
41+
unzip ./v2.14.0.zip
42+
cd text-2.14.0
4343
```
4444

4545
5. 修改源码的一些参数以此确保能正确构建.
4646

4747
* `oss_scripts/configure.sh`修改第49行为
4848

4949
```shell
50-
pip install tensorflow-macos==2.13.0
50+
pip install tensorflow-macos==2.14.0
5151
```
5252

5353
* (可选, 如果你没有通过`brew`安装`bazel`请直接跳过)`oss_scripts/run_build.sh`修改第18行为
5454

5555
```shell
56-
tf_bazel_version='5.3.0-homebrew'
56+
tf_bazel_version='6.1.0-homebrew'
5757
```
5858

5959
6. 运行脚本构建.

tutorials/text/text.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,54 @@ Please use `Xcode 14.3` and `Apple clang version 14.0.3 (clang-1403.0.22.14.1)`.
66

77
## Prerequisites
88

9-
It is assumed here that you have the necessary Unix-Like knowledge, [`brew`](https://brew.sh) and [`conda`](https://github.com/conda-forge/miniforge) have been installed in your terminal, and the installation and use methods of `brew` and `conda` will not be repeated here; most importantly, this tutorial is completely based on Apple Silicon build, so make sure your Mac is Apple Silicon.
9+
It is assumed here that you have the necessary Unix-Like knowledge, [`brew`](https://brew.sh) and [`conda`](https://github.com/conda-forge/miniforge) have been installed in your terminal, and the installation and use methods of `brew` and `conda` will not be repeated here; most importantly, this tutorial is completely based on Apple silicon build, so make sure your Mac is Apple silicon.
1010

1111
## Step by Step
1212

1313
1. Create a new Env and install the dependencies provided by Apple.
1414

1515
```shell
16-
conda create -n tensorflow-macos python=3.11 # Python 3.8, 3.9 and 3.10 are also supported.
16+
conda create -n tensorflow-macos python=3.11 # Python 3.9 and 3.10 are also supported.
1717
conda activate tensorflow-macos
1818
````
1919

2020
2. Install the `tensorflow` and `tensorflow-metal` plugins.
2121

2222
```shell
23-
pip install tensorflow==2.13.0 # Starting from tensorflow 2.13, official support for Apple silicon is available.
24-
pip install tensorflow-metal==1.0.1
23+
pip install tensorflow==2.14.0
24+
pip install tensorflow-metal==1.1.0
2525
````
2626
27-
3. Install `bazel 5.3.0`.
27+
3. Install `bazel 6.1.0`.
2828
2929
```shell
30-
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/59dff37de3c670a77c1e9f39b8a4b0f8884a391b/Formula/bazel.rb
30+
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/a9b3083e23806aebe61f7c39d393734a6949eaa5/Formula/bazel.rb
3131
brew install ./bazel.rb
32-
bazel --version # Make sure the version is 5.3.0.
32+
bazel --version # Make sure the version is 6.1.0.
3333
````
3434

3535
* Usually, the `bazel` installed by `brew` will be the latest version. The latest version often does not match the version required by `text`, which may cause many unexpected problems, so we install it by specifying the version manually.
3636

37-
4. Download and extract `text 2.13.0`.
37+
4. Download and extract `text 2.14.0`.
3838

3939
```shell
40-
wget https://github.com/tensorflow/text/archive/refs/tags/v2.13.0.zip
41-
unzip ./v2.13.0.zip
42-
cd text-2.13.0
40+
wget https://github.com/tensorflow/text/archive/refs/tags/v2.14.0.zip
41+
unzip ./v2.14.0.zip
42+
cd text-2.14.0
4343
````
4444
4545
5. Modify some parameters of the source code to ensure correct build.
4646
4747
* `oss_scripts/configure.sh` to modify line 49:
4848
4949
```shell
50-
pip install tensorflow-macos==2.13.0
50+
pip install tensorflow-macos==2.14.0
5151
````
5252

5353
* (Optional, if you have not installed `bazel` through `brew`, please skip it) `oss_scripts/run_build.sh` modify line 18:
5454

5555
```shell
56-
tf_bazel_version='5.3.0-homebrew'
56+
tf_bazel_version='6.1.0-homebrew'
5757
```
5858

5959
6. Run the script.

0 commit comments

Comments
 (0)