Skip to content

Have --container-mounts default to $PWD in #SBATCH header #162

@cponder

Description

@cponder

My most common interactive command-line with Pyxis is

srun --container-image $IMAGE --container-mounts $PWD --container-workdir $PWD ...

I really appreciate that I can compact the Pyxis into the job-control header these days

#SBATCH --container-image 'nvcr.io/nvidia/ai-workbench/python-cuda122:1.0.6'

instead of having to junk-up the code with an additional call-chain layer.
But this form

#SBATCH --container-mounts $PWD

doesn't work (and I wouldn't expect it to)

sbatch: error: pyxis: mount source must be a relative path, an absolute path, "tmpfs" or "umount"
sbatch: error: pyxis: could not add mount entry: $PWD:$PWD
sbatch: error: Invalid --container-mounts argument: $PWD

and neither does this one:

#SBATCH --container-mounts .

which fails less directly:

slurmstepd: error: pyxis: container start failed with error code: 1
slurmstepd: error: pyxis: printing enroot log file:
slurmstepd: error: pyxis:     enroot-switchroot: failed to execute: /bin/sh: No such file or directory
slurmstepd: error: pyxis: couldn't start container
slurmstepd: error: spank: required plugin spank_pyxis.so: task_init() failed with rc=-1
slurmstepd: error: Failed to invoke spank plugin stack

It'd be unfortunate to have to hard-code the local path into these kinds of scripts.
Could you make either of these forms

#SBATCH --container-mounts
#SBATCH --container-mounts .

translate to using the local directory?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions