How to authenticate to nvcr.io with SLURM + pyxis?

How do I authenticate to the nvcr.io registry when I want to run NGC containers with SLURM and pyxis? I do have an API key, but I don’t know where to put it
I deployed SLURM with deepops and tried to run:

$ srun --container-image=‘docker://$oauthtoken@nvcr.io#nvidia/tensorflow:20.10-tf2-py3’ grep PRETTY /etc/os-release

this gives:

pyxis: importing docker image …
slurmstepd: error: pyxis: child 14756 failed with error code: 1
slurmstepd: error: pyxis: failed to import docker image
slurmstepd: error: pyxis: printing contents of log file …
slurmstepd: error: pyxis: [INFO] Querying registry for permission grant
slurmstepd: error: pyxis: [INFO] Authenticating with user: docker://$oauthtoken
slurmstepd: error: pyxis: [ERROR] URL https://nvcr.io/proxy_auth returned error code: 401 Unauthorized
slurmstepd: error: pyxis: couldn’t start container

When I login with docker to nvcr.io the error with srun is the same

thx for help

In the meantime I figured out how to download NGC images in a separate step with enroot.
Maybe it’s possible to do it all in one when calling srun, but my problem is solved for now.