External Email - Use Caution
recon-all inside a Docker container, but it fails with the following error when launched programmatically through an SDK:ERROR: Invalid FreeSurfer license key found in license file /usr/local/freesurfer/license.txt
If you are outside the NMR-Martinos Center,
go to http://surfer.nmr.mgh.harvard.edu to
get a valid license file (it's free).
If you are inside the NMR-Martinos Center,
make sure to source the standard environment.
The command used by the SDK looks like this:docker run -v /usr/local/lib/python3.10/dist-packages/xxxx/execution/communication.patch:/usr/local/lib/python3.11/dist-packages/xxxx/sdk/communication.py:ro \
--cap-drop=NET_RAW -dt --name analysis_1420668 --entrypoint /bin/bash \
--cpus=4 --memory=16384m \
europe-west3-docker.pkg.dev/xxxx/freesurfer_530:dev-1.0 \
/xxxx/entrypoint.sh --project 2289 --analysis 1420668 \
--token xxxx --url https://xxxxx.com/ \
--tool-path tool:run
However, when I start the container manually (e.g., docker run -it ... /bin/bash) and run recon-all inside it directly, the license is detected and validated correctly. So the license.txt file at /usr/local/freesurfer/license.txt itself appears to be valid./xxx/entrypoint.sh altering the environment before recon-all starts.recon-all performs which might differ when running under /bin/bash -c or through an SDK wrapper?