NERSC / shifter

Shifter - Linux Containers for HPC
Other
348 stars 65 forks source link

Mount for shifter on NERSC #231

Closed DriftingPig closed 5 years ago

DriftingPig commented 6 years ago

I tried to run this script on NERSC cori: (it's trying to use a docker image kaylanb/desi:obiwan_rtd_jupyter to do a test run)

#!/bin/bash -l
#SBATCH --volume="/global/cscratch1/sd/huikong/obiwan_Aug/repos_for_docker:/srv/repos_for_docker"
#SBATCH --image=docker:kaylanb/desi:obiwan_rtd_jupyter
#SBATCH -N 1
#SBATCH -q debug
#SBATCH -t 00:30:00
#SBATCH -L SCRATCH
#SBATCH -C haswell #Use Haswell nodes
#SBATCH --mail-type=ALL 
#SBATCH --mail-user=kong.291@osu.edu

srun -N 1 -n 1 shifter --image=docker:kaylanb/desi:obiwan_rtd_jupyter python /srv/repos_for_docker/obiwan/tests/test_200x200_pixel_regions.py

And it gives me the error:

FAILED to create volume "to": /var/udiMount//srv/repos_for_docker, cannot create mount points in that location
FAILED to setup user-requested mounts.
FAILED to setup image.

I think it's because of the '/var/udiMount/' prefix, which makes it unable to create a mount. Can you tell me how to fix that?

scanon commented 6 years ago

You need to precreate the mount point in the image. So just add a RUN mkdir /your/mount/path. I fee like this check is to strict so I’m going to keep this open and see if we can allow this.

DriftingPig commented 6 years ago

I found that if the docker and NERSC host have the same name, and the directory has only 1 depth, like my image has a folder called /opt, while NERSC has it too, then I won't be able to access the NERSC /opt folder. However, If the folder is more than one depth, like '/global/cscratch1/sd/someone1', it wouldn't override my /global folder.

scanon commented 6 years ago

A site can block some directories. NERSC does that for /global. However the thing you first tried should have worked in my opinion.