nvidia-docker from within VS code? (devcontainer json)

Is there a way to run nvidia-docker from vs code remote docker extention?
The docker instructions are

`nvidia-docker build -t detectron2:v0 .`
`nvidia-docker run -it --name detectron2 detectron2:v0`

But vs code runs docker build/ docker run and it is not configurable.
The one thing that is configurable is the devcontainer.json with the structure

    "name": "Existing Dockerfile",
    "context": "..",
    "dockerFile": "../Dockerfile",
    "runArgs": [
    "settings": {
        "terminal.integrated.shell.linux": null
    "extensions": []

I see that by adding --runtime=nvidia is equaivalent to nvidia-docker run, but how can I also control the build process?

Source: StackOverflow