Limit Tensorflow CPU and Memory usage

I've seen several questions about GPU Memory with Tensorflow but I've installed it on a Pine64 with no GPU support. That means I'm running it with very limited resources (CPU and RAM only) and