You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The purpose of this document is to elaborate on the advanced configuration options offered by pyClowder2.

This list should be expanded as new features are discovered.

Mounted Paths

When running an extractor within a container, it is sometimes necessary or beneficial to map from one an absolute path on the host to a different absolute path within the container.


For example: if Clowder stores its uploaded files at /Users/myname/clowder/data , but you want this data mounted into the extractor container at /home/clowder/data to avoid embedding an arbitrary username into the path.

To configure such a scenario, pass a stringified JSON map of host absolute path => container absolute path into the MOUNTED_PATHS  environment variable in the container:

    docker run -it -v /Users/lambert8/clowder/data/:/home/clowder/data/ -e MOUNTED_PATHS '{ "/Users/lambert8/clowder/data":"/home/clowder/data" }' ...

The -v  flag above tells Docker where to map our files, and the MOUNTED_PATHS  environment variable tells pyClowder about this mapping as well.

Now, when the process_message  call comes through, the local_paths property of the resource metadata passed by the function stores the substituted path(s).


NOTE: In order to leverage the MOUNTED_PATHS  configuration option, your extractor's check_message  function must NOT return CheckMessage.bypass

  • No labels