brainlife / ezbids

A web service for semi-automated conversion of raw imaging data to BIDS
https://brainlife.io/ezbids
MIT License
26 stars 13 forks source link

docker version of ezbids failed to start #127

Closed madeleinebarter closed 2 months ago

madeleinebarter commented 2 months ago

I am trying to run ezBIDS on Docker Desktop on a Mac. I installed Docker, Docker Compose, and the recommended version of Node. However, when I try to run it I receive the following message when it self-terminates: Gracefully stopping... (press Ctrl+C again to force) dependency failed to start: container brainlife_ezbids-api is unhealthy

I'm not sure wherein the issue lies and would appreciate any feedback. I have verified that Node is using v20.11.0, but I am unsure which version of npm to use. I have tried the 10.7.0 version and the 9.6.3 version. The only thing that I can think of that would be the issue is npm, because when I try to start up ezBIDS there appears to be an issue with npm, see the attached image.

Screenshot 2024-07-19 at 3 02 15 PM

I am also able to launch the local ezBIDS website on Chrome, but it has trouble with uploading files, I tried uploading the data file from ezBIDS_tutorial_data.

Additionally, I looked at Docker while the ezBIDS website was open on Chrome, and it appears that in the ezbids container, brain life_ezbids-handler was created but not running.

madeleinebarter commented 2 months ago

I ran an npm audit report and got this:

Screenshot 2024-07-19 at 4 04 19 PM
dlevitas commented 2 months ago

Hi @madeleinebarter thanks for reaching out.

Can you provide the specifications for the following:

And just so we're on the same page, are you doing the following in your terminal:

  1. cd /path/to/where/you/want/to/install/ezbids
  2. git clone https://github.com/brainlife/ezbids
  3. cd ezbids && ./dev.sh -d

For npm, I think the version we use is 8.11.0 so you could try installing that version specifically.

You may need to delete the current docker containers/volumes when restarting.

madeleinebarter commented 2 months ago

Thanks! I am working on a 2023 Mac Studio with an Apple M2 Max chip and I am using those steps to run it in Docker. I am using Docker Desktop, and I attached an image with all the versions.

Screenshot 2024-07-19 at 4 16 16 PM
dlevitas commented 2 months ago

Thanks for this information. I would suggest trying npm version 8.11.0 and seeing if that resolves your issue. I've never tried using Docker Desktop for building ezBIDS, so you may also consider running the commands in your terminal directly.

Let me know if your problem persists.

madeleinebarter commented 2 months ago

I ran it directly in my terminal, and I tried running it again using npm version 8.11.0 and node v20.11.0, and I still am without any success.

But I asked ChatGPT (with a lot of specifics about the problem), who directed me to the packages.json file where I change multer to 1.4.4-lts.1 and it finally ran correctly!

dlevitas commented 2 months ago

That's great to hear. I'll look into the package.json fix myself and update the documentation if need be.