trendscenter / coinstac

Collaborative Informatics and Neuroimaging Suite Toolkit for Anonymous Computation
MIT License
47 stars 19 forks source link

Singularity testing #1685

Open rssk opened 1 year ago

rssk commented 1 year ago

Task Description

Test

dylanmartin commented 1 year ago

VBM preprocessor

How should the computation step be configured? image

Is this the right mapping? image

dylanmartin commented 1 year ago

There are 2 issues here:

  1. The download failed for some reason
  2. It appears that the file exists and therefor passes the isSingularityImageLatest check but the image is bad image

image

dylanmartin commented 1 year ago

rm -rf the image gets permission denied image sudo works

dylanmartin commented 1 year ago

It looks like permission is denied to add the files when downloading

Image

dylanmartin commented 1 year ago

Adding the --fix-perms option so singularity build was a suggested solution in the error text. That seemed to potentially fix the problem but now there's an error saying 'not enough space on device' I'll clear some space to see if it works. There is a warning in the error text that says: WARNING: The --fix-perms option modifies the filesystem permissions on the resulting container. Let's revisit to make sure it isn't a security issue.

dylanmartin commented 1 year ago

We may need more space on this volume image

dylanmartin commented 1 year ago

Increased size of storage on the EC2 instance from 30GB to 60GB. No longer running int device space limits.

dylanmartin commented 1 year ago

Running VBM pre image

dylanmartin commented 1 year ago

It looks like the docker image for the remote isn't pulled image

dylanmartin commented 1 year ago

image

dylanmartin commented 1 year ago

Computation is running image

dylanmartin commented 1 year ago

image

image Is this the expected result from VBM pre?

dylanmartin commented 1 year ago

@rssk which of these computations is "VBM regression"? image I'm guessing it's Regression - VBM

dylanmartin commented 1 year ago

Configuring the VBM regression pipeline step this way: image

dylanmartin commented 1 year ago

Files are showing up in the wrong place image

dylanmartin commented 1 year ago

VBM preprocessor is taking a while. Moving on to VBM regression to see if that completes. Using this configuration: image image

dylanmartin commented 1 year ago

image

dylanmartin commented 1 year ago

image

dylanmartin commented 1 year ago

It isn't necessarily true that these runs are hanging because we're using Singularity. It's likely there is some other issue.

dylanmartin commented 1 year ago

https://github.com/trendscenter/coinstac/issues/1693

dylanmartin commented 1 year ago
image
dylanmartin commented 1 year ago
image

Line 79 in the startscript is exec $@. To see the contents of $@, the values can be echoed and sent to the logs. The container must be rebuilt from this container recipe to run the modified startscript.

dylanmartin commented 1 year ago
image

Modify runscript and not startscript

dylanmartin commented 1 year ago

Echo successfully logged. It looks like a json object is being passed into the exec command. Are these the expected arguments?

image
dylanmartin commented 1 year ago

Are these the correct args?

image
dylanmartin commented 1 year ago
image
dylanmartin commented 1 year ago

ServiceFunctionGenerator is not getting a compspecVersion argument so it defaults to 1. the opts parameter to createService does contain a key called version that appears to reflect the compspec version.

dylanmartin commented 1 year ago

After feeding the correct compspecVersion to serviceFunctionGenerator, the code goes down compspecVersion 2 switch case. it then encounters this error

image

The error executing the exec function in the startscript happens as well.

dylanmartin commented 1 year ago

This is what gets passed to spawn when starting the container

image
dylanmartin commented 1 year ago
image

Are these the commands that need to be executed by the exec line in the runscript?

rssk commented 1 year ago
dylanmartin commented 1 year ago

We must not be running from the .sif

dylanmartin commented 1 year ago

ws error not bubbling up image

dylanmartin commented 1 year ago

The python server inside the singularity container for compspecVersion 2 needs to know what port to listen on for ws connections.

rssk commented 1 year ago

Investigate if a non zero exit code process triggers singularity instance to propagate or other show the error

dylanmartin commented 1 year ago

The above comment is referring to the entry command script. For example:

    "command": [
      "python",
      "\/computation\/scripts\/local.py"
    ],
rssk commented 1 year ago

Got vbm working, had to fix the passed in env to singularity's start, they need to be comma separated --env B=1,C=1