Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting Dockerfile into a Singularity definition file #1

Open
andersy005 opened this issue May 15, 2020 · 1 comment
Open

Converting Dockerfile into a Singularity definition file #1

andersy005 opened this issue May 15, 2020 · 1 comment

Comments

@andersy005
Copy link
Member

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:

@kmpaul
Copy link

kmpaul commented Jun 30, 2020

@andersy005 This is actually an interesting idea, and I'd like to pursue it. I also just heard about someone who is using gradle + jib to build the layers of a Docker image without using Docker. Thus, getting around the need to be able to run Docker on the HPC system.

What I don't know is if there is a Python equivalent to jib or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants