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
See the example Dockerfile.
Installation of the NVIDIA Container Toolkit is necessary for GPU use. Then, expose the GPU(s) to the docker container using the --gpus all
flag. Example:
docker run -it --rm --gpus all wamuir/golang-tf:gpu
For background on the problem, see Tensorflow issues 39307, 39744, 41808, 43847, and 44655, among others.