Svdvoort / PrognosAIs_glioma

Predicting genetics and providing segmentation of glioma
Apache License 2.0
16 stars 1 forks source link

Illegal instruction error when running docker file #4

Closed felixbeutter closed 6 months ago

felixbeutter commented 7 months ago

The problem is kind of similar to issue #3 by GabrielStahl.

When I run the docker file as instructed, an "illegal instruction" error message appears:

/run_pipeline.sh: line 51: 276 Illegal instruction python3 /get_predictions.py $prognosais_model_folder $registration_folder $prediction_output_folder $config_file

No output is generated. I would greatly appreciate any suggestions.

Svdvoort commented 7 months ago

Hi,

I would need some more information to diagnose this problem.

felixbeutter commented 7 months ago

Hi,

I used the version from docker hub and a MacBook Pro 2023 (M2 Pro) with MacOS 14.2.1. My docker version is 25.0.2, build 29cf629. The command was:

"docker run -u $UID:$GROUPS -v "./input:/input/" -v "./output:/output/" svdvoort/prognosais_glioma:1.0.2" (input folder contains the data in format you described in your readme).

I appreciate any ideas to fix it and thank you for the fast reply!

Svdvoort commented 7 months ago

It might be an issue of tensorflow in combination with M2. See, for example here and here.

There would be two solutions: one would be to install everything yourself instead of using the docker. You could try out a TensorFlow version that is made for M2 chips (the currently used TensorFlow version is for x64 systems). M2 chips are quite notorious in general for causing problems with "older" programs, so another option would be to test it out on a different system (either a Windows or Linux system or a Mac that is not M1/M2, if that's possible).

Unfortunately, I don't have access to an M1/M2 system myself, so I cannot test it out, so I cannot help you directly with this. Also, be aware that TensorFlow has no GPU support directly on Mac. I would suggest running it on a different system if possible, but if you manage to install the pipeline and get it working, please let me know the package versions you used. I could consider creating a separate docker/instructions.

To see what you need to install, you can check out the original Docker file here.

felixbeutter commented 6 months ago

Hi again, I guess you were right. The problem might be caused by the M2 and older tensorflow, python, etc. versions. I run your code from the PrognosAIs_glioma and PrognosAIs locally with tensorflow 2.15.0 in a python 3.11.7 environment and it seems to work just fine with only minor modifications. Thank you so much for the support!

Svdvoort commented 6 months ago

No problem! I'll close this issue then.