I'm using the following hideous syntax to tell my docker container to use all the CPUs on the host machine:
docker run --cpuset-cpus="0-`python3 -c "from multiprocessing import cpu_count; print(cpu_count() -1)"`" ubuntu:latest /bin/bash
Is there a better way?