Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined function 'spm_CTseg' #26

Open
Alvi305 opened this issue Dec 31, 2023 · 1 comment
Open

Undefined function 'spm_CTseg' #26

Alvi305 opened this issue Dec 31, 2023 · 1 comment

Comments

@Alvi305
Copy link

Alvi305 commented Dec 31, 2023

I am using my forked repository of the original here : https://github.com/Alvi305/CTseg/tree/master.

The change is in the # Install SPM Standalone in /opt/spm12/ section where my Dockerfile uses SPM_REVISION r7771 and specific URL to download SPM since the original one gives me the following error:

` ERROR [4/5] RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/do 3.3s

[4/5] RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm12_latest_tbx_Linux_R2019b.zip && unzip -q /opt/spm12_latest_tbx_Linux_R2019b.zip -d /opt && rm -f /opt/spm12_latest_tbx_Linux_R2019b.zip && /opt/spm12/spm12 function exit && chmod +x /opt/spm12/spm12:
0.434 --2023-12-31 05:18:15-- https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm12_latest_tbx_Linux_R2019b.zip
0.454 Resolving www.fil.ion.ucl.ac.uk (www.fil.ion.ucl.ac.uk)... 193.62.66.18
1.900 Connecting to www.fil.ion.ucl.ac.uk (www.fil.ion.ucl.ac.uk)|193.62.66.18|:443... connected.
2.428 HTTP request sent, awaiting response... 404 Not Found
3.218 2023-12-31 05:18:18 ERROR 404: Not Found.
3.218

Dockerfile:36

35 | # Also, set +x on the entrypoint for non-root container invocations
36 | RUN wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm${SPM_VERSION}_${SPM_REVISION}_tbx_Linux_${MATLAB_VERSION}.zip
37 | && unzip -q /opt/spm${SPM_VERSION}${SPM_REVISION}tbx_Linux${MATLAB_VERSION}.zip -d /opt
38 | && rm -f /opt/spm${SPM_VERSION}
${SPM_REVISION}tbx_Linux${MATLAB_VERSION}.zip
39 | && /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit
40 | && chmod +x /opt/spm${SPM_VERSION}/spm${SPM_VERSION}
41 |

ERROR: failed to solve: process "/bin/sh -c wget --no-check-certificate --progress=bar:force -P /opt https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/tbx/spm${SPM_VERSION}_${SPM_REVISION}_tbx_Linux_${MATLAB_VERSION}.zip && unzip -q /opt/spm${SPM_VERSION}${SPM_REVISION}tbx_Linux${MATLAB_VERSION}.zip -d /opt && rm -f /opt/spm${SPM_VERSION}${SPM_REVISION}tbx_Linux${MATLAB_VERSION}.zip && /opt/spm${SPM_VERSION}/spm${SPM_VERSION} function exit && chmod +x /opt/spm${SPM_VERSION}/spm${SPM_VERSION}" did not complete successfully: exit code: 8`

Using my Dockerfile does not give the above error. However, when I try to run the spm_CTseg function using the docker command: docker run --rm -it -v C:\Braillic\CTseg:/data ubuntu:ctseg function spm_CTseg '/data/MR_Gd.nii', I get this error:

C:\Braillic\CTseg>docker run --rm -it -v "C:\Braillic\CTseg":/data ubuntu:ctseg function spm_CTseg '/data/MR_Gd.nii'
SPM12, version 7771 (standalone)
MATLAB, version 9.7.0.1737446 (R2019b) Update 9


/ )( _ ( / )
_
\ )
/ ) ( Statistical Parametric Mapping
(
/(_) (_//_) SPM12 - https://www.fil.ion.ucl.ac.uk/spm/

Error using feval
Undefined function 'spm_CTseg' for input arguments of type 'char'.
Error in spm_standalone (line 132)

Could anyone kindly tell me how I can resolve the issue?

Thank you.

@brudfors
Copy link
Contributor

brudfors commented Jan 3, 2024

Hello @Alvi305

I have updated the Dockerfile, can you please try again with the latest master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants