To create an ephemeral (docker-like) MacOS VM on a Mac with full performance and access (e.g. GPU) you have to use a virtualization API provided by Apple.
For most CI use, you can choose between:
Anka, a "contact-us for pricing" closed-source projet, where you have to pay expensive license (easy 3000 USD/yr per machine)
or
tart, which is a lightweight wrapper around the official Apple API.
But you have to know that on MacOS, there is an artificial limit of 2 VMs per Mac... but well: