QIIME Docker image always caching when used with cwltool

I am attempting to use the qiime2/core:2018.6 docker image with cwltool.
Every time I run a command it prints out the following message:

QIIME is caching your current deployment for improved performance. This may take a few moments and should only happen once per deployment.

This is due to how cwltool creates a temporary home directory for each command run. This helps create a sanitary environment for running commands. Unfortunately this throws away the qiime2 cache.

I was able to work around this by creating my own docker images specifying a value for XDG_CONFIG_HOME:

FROM qiime2/core:2018.6
ENV XDG_CONFIG_HOME /qiime2_cache
RUN qiime dev refresh-cache
CMD bash

Do you know of any issues with using this approach to store the qiime2 cached data inside the docker image?

Thanks.

2 Likes

:+1:

Sounds reasonable to me - we do something similar in the official image: vm-playbooks/docker/Dockerfile at master · qiime2/vm-playbooks · GitHub

I wonder if there is something we could do different in the future to make the official image more portable?

Anyway, thanks for checking, keep us posted!

Thanks for the quick response.

I think if you added something like ENV XDG_CONFIG_HOME /qiime2_cache above the RUN qiime dev refresh-cache in your docker file it would fix this for the official image. If you are interested in such a change I could create a PR.

1 Like

Thanks @johnbradley!

A PR would be great! Thanks! :qiime2: :t_rex:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.