Docker Community Forums

Share and learn in the Docker community.

Adding CPUs accessible by docker for TensorFlow on Windows 10

(Blazespinnaker) #1

I’m using Tensorflow on windows 10 with docker (yes, I know Windows 10 isn’t officially supported yet). It performs ok, but only looks like I am only accessing just one of my cpu cores (I have 4). Tensorflow has the ability to assign ops to different cpus, so I’d like to be able to get access to all 4. In VirtualBox when I view the settings it only says there is 1 cpu out of the 4 that is configured for the machine. I tried editing the machine to set it to more (after doing a docker-machine stop), but that lead to all sorts of weirdness.

Does anyone know the right way to either create or restart a docker machine to have 4 CPUs? Or if it’s even possible on Windows 10? I’m using the docker quickstart container app.

Here is the weirdness that I see:

Machine default already exists in VirtualBox.
Starting machine default...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): Regenerating TLS certificates
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.
Setting environment variables for machine default...
Error running connection boilerplate: Error checking and/or regenerating the certs: There was an error validating certificates for host "": dial tcp i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs name'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

(Blazespinnaker) #2

ok, i found one way to make it work. I pass the cpu_count flag when I create the machine rather than modifying it part way.

eg: docker-machine create -d virtualbox --virtualbox-cpu-count=-1 dev