NVIDIA / pyxis

Container plugin for Slurm Workload Manager
Apache License 2.0
266 stars 30 forks source link

specify the user in Docker container in --container-image while giving path #86

Closed praveen5733 closed 1 year ago

praveen5733 commented 1 year ago

Is it possible to specify a user you want to log in to your docker container while specifying a path to the sqsh image of the docker in --container-image option. For e.g. --container-image=USERNAME@/path/to/Dockerimage.sqsh

By default when I run the srun with --container-image option specifying the path for e.g. --container-image=/path/to/Dockerimage.sqsh The default user in the container is the root. But for my use case, I would like to be logged in as a different user.

flx42 commented 1 year ago

You can appear as root inside the container with --container-remap-root or as yourself with --no-container-remap-root, but you can't assume the identity of another user, a Slurm job is always associated to a single UID. For your use case, you would have to su to the other user and then submit a new Slurm job.