How to specify `–gpus` in docker-compose for nvidia-docker?

According to, Docker supports a --gpus flag as of Docker 19.03. Is there a way to use this in docker-compose yet? If so, how? I also realize Docker 19.03 is brand new right now, and looking at it might take some time for it to be available in compose?

Source: StackOverflow