You can configure env var SPARK_WORKER_CORES, which makes spark assume you have this number of cores regardless of what you actually have.
SPARK_WORKER_CORES