Skip to content

Commit 986cd10

Browse files
wamuirnitins17
authored andcommitted
Update Go API installation guide for TensorFlow 2.8.0 (#74)
1 parent ab4f29f commit 986cd10

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

golang_install_guide/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ library is required for use of the TensorFlow Go package at runtime. For example
3636
on Linux (64-bit, x86):
3737

3838
```sh
39-
$ curl -L https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.7.0.tar.gz | tar xz --directory /usr/local
39+
$ curl -L https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.8.0.tar.gz | tar xz --directory /usr/local
4040
$ ldconfig
4141
```
4242

@@ -74,7 +74,7 @@ Instead, follow these instructions.***
7474
workspace for `/go` in the command below.
7575

7676
```sh
77-
$ git clone --branch v2.7.0 https://github.com/tensorflow/tensorflow.git /go/src/github.com/tensorflow/tensorflow
77+
$ git clone --branch v2.8.0 https://github.com/tensorflow/tensorflow.git /go/src/github.com/tensorflow/tensorflow
7878
```
7979

8080
- Change the working directory to the base of the cloned TensorFlow repository,
@@ -85,10 +85,10 @@ Instead, follow these instructions.***
8585
$ cd /go/src/github.com/tensorflow/tensorflow
8686
```
8787

88-
- Apply a set of required patches to the TensorFlow source code.
88+
- Apply a required patch to the TensorFlow source code.
8989

9090
```sh
91-
$ git cherry-pick --strategy-option=no-renames --no-commit 41bfbe8 74bf9d1 a33fba8 aa700a8 b451698 f6a59d6
91+
$ git cherry-pick --strategy-option=no-renames --no-commit 65a5434
9292
```
9393

9494
- Initialize a new go.mod file.
@@ -127,7 +127,7 @@ workspace for `/go` in the command below:
127127

128128
```sh
129129
$ go mod init hello-world
130-
$ go mod edit -require github.com/tensorflow/tensorflow@v2.7.0+incompatible
130+
$ go mod edit -require github.com/tensorflow/tensorflow@v2.8.0+incompatible
131131
$ go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow
132132
$ go mod tidy
133133
```
@@ -173,7 +173,7 @@ func main() {
173173

174174
```sh
175175
$ go mod init app
176-
$ go mod edit -require github.com/tensorflow/tensorflow@v2.7.0+incompatible
176+
$ go mod edit -require github.com/tensorflow/tensorflow@v2.8.0+incompatible
177177
$ go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow
178178
$ go mod tidy
179179
```

golang_install_guide/example-program/Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
FROM golang:1.17-bullseye
1818

19-
# 1. Install the TensorFlow C Library (v2.7.0).
20-
RUN curl -L https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-$(uname -m)-2.7.0.tar.gz \
19+
# 1. Install the TensorFlow C Library (v2.8.0).
20+
RUN curl -L https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-$(uname -m)-2.8.0.tar.gz \
2121
| tar xz --directory /usr/local \
2222
&& ldconfig
2323

@@ -27,20 +27,19 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
2727
protobuf-compiler
2828

2929
# 3. Install and Setup the TensorFlow Go API.
30-
RUN git clone --branch=v2.7.0 https://github.com/tensorflow/tensorflow.git /go/src/github.com/tensorflow/tensorflow \
30+
RUN git clone --branch=v2.8.0 https://github.com/tensorflow/tensorflow.git /go/src/github.com/tensorflow/tensorflow \
3131
&& cd /go/src/github.com/tensorflow/tensorflow \
32-
&& git cherry-pick --strategy-option=no-renames --no-commit 41bfbe8 74bf9d1 a33fba8 aa700a8 b451698 f6a59d6 \
32+
&& git cherry-pick --strategy-option=no-renames --no-commit 65a5434 \
3333
&& go mod init github.com/tensorflow/tensorflow \
3434
&& (cd tensorflow/go/op && go generate) \
3535
&& go mod tidy \
3636
&& go test ./...
3737

38-
3938
# Build the Example Program.
4039
WORKDIR /example-program
4140
COPY hello_tf.go .
4241
RUN go mod init app \
43-
&& go mod edit -require github.com/tensorflow/tensorflow@v2.7.0+incompatible \
42+
&& go mod edit -require github.com/tensorflow/tensorflow@v2.8.0+incompatible \
4443
&& go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow \
4544
&& go mod tidy \
4645
&& go build

0 commit comments

Comments
 (0)