bids-apps / bids-apps.github.io

This BIDS Apps website has now been integrated to the BIDS website: https://github.com/bids-standard/bids-website.git
Other
3 stars 14 forks source link

"No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']" CircleCI error during testing #95

Closed yeunkim closed 1 year ago

yeunkim commented 1 year ago

I'm running tests on CircleCI for BrainSuite BIDS App and I have been running into this error:

test: print version
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#!/bin/bash -eo pipefail
docker load -i /tmp/workspace/docker/image.tar
docker run -ti --rm --read-only \
  -v /tmp/workspace/data/ds114_test1:/bids_dataset \
  -v ${HOME}/outputs02:/outputs \
    bids/${CIRCLE_PROJECT_REPONAME,,} \
      /bids_dataset \
      /outputs participant --version

Loaded image: bids-apps/brainsuite:latest
Unable to find image 'bids/brainsuite:latest' locally
latest: Pulling from bids/brainsuite
Image docker.io/bids/brainsuite:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/

beaf4746: Pulling fs layer 
f24b2f04: Pulling fs layer 
ad169b64: Pulling fs layer 
c6d5adc7: Pulling fs layer 
ab9f2a29: Pulling fs layer 
4b4059e9: Pulling fs layer 
1a21da73: Pulling fs layer 
95caeb02: Pulling fs layer 
e5bc09e8: Pulling fs layer 
3589680c: Pulling fs layer 
bba3cada: Pulling fs layer 
f6521379: Pulling fs layer 
e4a4baa8: Pulling fs layer 
cfbeee3a: Pulling fs layer 
03d7defc: Pulling fs layer 
dc8e2ad7: Pulling fs layer 
db59422b: Pulling fs layer 
Digest: sha256:8487b132383863d077361f0c31030efbce31eecdea77933f9908ef7c2c86eebe
Status: Downloaded newer image for bids/brainsuite:latest
^@^@Traceback (most recent call last):
  File "./qc-system/run.py", line 9, in <module>
    import nibabel
  File "/opt/conda/lib/python2.7/site-packages/nibabel/__init__.py", line 45, in <module>
    from .loadsave import load, save
  File "/opt/conda/lib/python2.7/site-packages/nibabel/loadsave.py", line 18, in <module>
    from .imageclasses import all_image_classes
  File "/opt/conda/lib/python2.7/site-packages/nibabel/imageclasses.py", line 15, in <module>
    from .minc2 import Minc2Image
  File "/opt/conda/lib/python2.7/site-packages/nibabel/minc2.py", line 31, in <module>
    h5py, have_h5py, setup_module = optional_package('h5py')
  File "/opt/conda/lib/python2.7/site-packages/nibabel/optpkg.py", line 98, in optional_package
    pkg = __import__(name, fromlist=fromlist)
  File "/opt/conda/lib/python2.7/site-packages/h5py/__init__.py", line 60, in <module>
    from .tests import run_tests
  File "/opt/conda/lib/python2.7/site-packages/h5py/tests/__init__.py", line 13, in <module>
    from .common import ut
  File "/opt/conda/lib/python2.7/site-packages/h5py/tests/common.py", line 40, in <module>
    testfile, fname = tempfile.mkstemp(unichr(0x03b7))
  File "/opt/conda/lib/python2.7/tempfile.py", line 307, in mkstemp
    dir = gettempdir()
  File "/opt/conda/lib/python2.7/tempfile.py", line 275, in gettempdir
    tempdir = _get_default_tempdir()
  File "/opt/conda/lib/python2.7/tempfile.py", line 217, in _get_default_tempdir
    ("No usable temporary directory found in %s" % dirlist))
IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

I believe it can't find the /tmp directory inside the CircleCI container (not the bids app container). Do you have any suggestions? Current config.yml is located in bids-apps/BrainSuite/.circleci/config.yml (https://github.com/bids-apps/BrainSuite/blob/master/.circleci/config.yml).

I hope this is the correct place to post this issue, but if not, please let me know where the appropriate place is would be to post CircleCI testing issues for bids apps.

Thank you!

Remi-Gau commented 1 year ago

hey @yeunkim

thanks for reaching out

Given that several of the BIDS maintainers are following the several repos in in the bids app organization you can also just ping us when opening an issue in your repo.

Given that I am the one who made a lot of changes to many circle CI workflows recently to "get them back online" (they had not been running for years for many repo), it is pretty much due that that some of those CI no show red.

Will have a look at your repo.

Remi-Gau commented 1 year ago

@yeunkim things are looking better let's see if the latest build in circle CI finishes

related to Brainsuite: is there a reason why it is not listed on our board of bids apps?

https://bids-apps.neuroimaging.io/apps/

If not I can make the relevant changes to add it

yeunkim commented 1 year ago

@Remi-Gau

Awesome, thank you! Looking good so far.

I'm not sure why it's not on there, but we would love to be part of the board!

Remi-Gau commented 1 year ago

It worked and the docker image got pushed on docker hub as "unstable": https://hub.docker.com/layers/bids/brainsuite/unstable/images/sha256-dc2c33436a079e49e64c52ce9e9fd4aa0eb9c5569621b909bcf63d583f147ca0?context=explore

when you make a release in the github repo it should push an image with the version tag and with the latest tag.

Will close this issue and open another to remember to add it to the board.