Hyper-v container resources

I am using several Windows 10 hosts in swarm mode. Unfortunatelly docker for Windows 10 only supports hyper-v isolation for running containers. Each hyper-v container has by default only 1GB memory and 2 vCPUs. This limit contradicts documentation “By default, a container has no resource constraints”. I am running containers that need more than default hyper-v limits. For memory I was able to work around this by setting limits in compose file v3.

For example for settings 8GB memory:
image: my-test-image
memory: 8g

However I did not find a way how to change number of vCPUs. How can it be changed?

The CPU options are documented at https://docs.docker.com/engine/reference/commandline/run/

--cpu-count	0	CPU count (Windows only)
--cpu-percent	0	CPU percent (Windows only)

Memory clarifications are merged but not published yet to docs.docker.com. -m specifies the max size a container can consume, but it is still allocated on-demand and held in a “vmmem” process which you can see in task manager.

Thanks for the docker run option. However I am using swarm mode. Is it possible to do the same thing with compose v3 file or alternative with “docker service create”?