When running XCPD using Docker, how can I specify a template?

When running XCPD using Docker, how can I specify a template? Our workstation is not connected to the internet, and I manually placed the template files in the .cache directory. I added the following code to the command: -v /home/name/.cache:/home/name/.cache/templateflow , but it didn’t run successfully.

Hi @Donggua,

You can use the -e flag in Docker to set environment variables within containers (in your case you’ll need to define TEMPLATEFLOW_HOME). See more here How to Set Docker Environment Variables [With Examples] | Cherry Servers.

The default TEMPLATEFLOW_HOME variable should be /home/$user/.cache/templateflow. Your mounting statement will cause a problem since the way you put it, you’re actually telling XCP to look for templateflow in /home/$user/.cache/templateflow/templateflow

I would also make sure that you’ve actually downloaded the data you need from templateflow (e.g., with datalad).

Without knowing more about your dataset and how you are running XCP (e.g., the things we usually ask for in software support posts), it is hard to debug further.

Best,
Steven

1 Like

Thank you very much for the solution. It is very effective! Thank you so much.

1 Like