Giter Club home page Giter Club logo

Comments (5)

vsoch avatar vsoch commented on June 15, 2024

You shouldn't need to run the docker container as root, but you would need the user added to the Docker group. But there is still the issue with the files permissions.

Could you try rebuilding the container, but commenting these two lines that copy actions and environment scripts? https://github.com/singularityware/docker2singularity/blob/master/docker2singularity.sh#L273

Older versions of Singularity wouldn't provide these, but (I think) it's likely the case that the build will handle it. Let me know if the files exist, and if that resolves the permissions, and I can do a fix.

from docker2singularity.

jcohen02 avatar jcohen02 commented on June 15, 2024

Thanks for the quick response @vsoch.

I commented out lines 273 and 274 in the docker2singularity.sh script.

I hadn't noticed that the subsequent commands generate the 10-docker.sh script and copy this into $build_sandbox/.singularity.d/env/ so the first time I ran, the run fails at step 5 with:

(5/10) Setting ENV variables...
cp: can't create '/tmp/testimage.build/.singularity.d/env/10-docker.sh': No such file or directory

I added a line to create this directory after the two commented out lines:

mkdir $build_sandbox/.singularity.d/env; chmod 755 $build_sandbox/.singularity.d/env

The script now runs successfully, creates the testimage.simg file and I can run a terminal in the singularity container without having to be root.

I can also confirm that within the singularity container, /.singularity.d/env contains 6 scripts in addition to 10-docker.sh (i.e. 01-base.sh, 90-environment.sh, etc.)

There are also 5 scripts in the /.singularity.d/actions directory. It looks like these directories are therefore being populated correctly without the copy commands in script.

If you don't mind updating this, that's great, otherwise I'm happy to raise a PR for the changes.

from docker2singularity.

vsoch avatar vsoch commented on June 15, 2024

Woot, good work @jcohen02 I'm so glad that fixed it!

If you have the bandwidth, I'd greatly appreciate a PR to the branch that corresponds with the version you are working with (e.g., https://github.com/singularityware/docker2singularity/tree/v3.3.0). Once that goes through, I'll open another PR for that branch to master.

from docker2singularity.

jcohen02 avatar jcohen02 commented on June 15, 2024

Thanks @vsoch, great that this was straightforward to resolve. PR created against v3.3.0.

from docker2singularity.

vsoch avatar vsoch commented on June 15, 2024

Fixed with #68 #69 thanks @jcohen02 !

from docker2singularity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.