This repository contains Dockerfiles for using Tensorflow in Go. You can build on your own or pull an image from wamuir/golang-tf on Docker Hub:
docker pull wamuir/golang-tf:2.4.0
Go modules (go mod
) will work when using the image. Use the require
and replace
flags as follows:
go mod edit -require github.com/tensorflow/tensorflow@v2.4.0+incompatible
go mod edit -replace github.com/tensorflow/tensorflow=/go/src/github.com/tensorflow/tensorflow
For background on the problem, see Tensorflow issues 39307, 39744, 41808, 43847, and 44655, among others.