Currrently, repo2singularity relies on repo2docker to create a docker image that repo2singularity converts into a singularity image file (SIF). I was thinking that we could use the output of repo2docker --no-build to generate a singularity definition file. This would allows us to bypass the intermediary step of creating a docker image.
- step 1: Generate Dockerfile
$ jupyter-repo2docker --no-build --debug --ref 9ced85dd9a84859d0767369e58f33912a214a3cf https://github.com/norvig/pytudes 2> dockerfile.tmp
$ sed -n -e '/FROM/,$p' dockerfile.tmp > Dockerfile
$ spython recipe Dockerfile >> Singularity
- Step 3: Build the singularity container locally (if the user has sudo permissions)
$ sudo singularity build myimage.sif Singularity
Or build the singularity container on a remote builder (https://cloud.sylabs.io/builder) (does not require sudo)
singularity --remote build myimage.sif Singularity
Unfortunately, as it is pointed out in the documentation, this output is present for debugging purposes only :(. There are things that are hard coded because they are being copied from the local environment. So, this option of bypassing docker images seems to be out of scope for repo2singularity. I am just opening this issue for future reference.
Xref:
Currrently,
repo2singularityrelies onrepo2dockerto create a docker image thatrepo2singularityconverts into a singularity image file (SIF). I was thinking that we could use the output ofrepo2docker --no-buildto generate a singularity definition file. This would allows us to bypass the intermediary step of creating a docker image.$ spython recipe Dockerfile >> SingularityOr build the singularity container on a remote builder (https://cloud.sylabs.io/builder) (does not require sudo)
Unfortunately, as it is pointed out in the documentation, this output is present for debugging purposes only :(. There are things that are hard coded because they are being copied from the local environment. So, this option of bypassing docker images seems to be out of scope for
repo2singularity. I am just opening this issue for future reference.Xref:
Repo2Docker: make it easy to start from arbitrary docker image
the Dockerfile is not enough to generate the image jupyterhub/repo2docker#202