Get current tagged version at runtime

I have a Python Compute Module, which is authored via Foundry repository. How can I at runtime pull the current tag in my Python code?

Just to confirm, you want to get the tag of the running CM from within the CM?

Yes, exactly. This is what I want to do.

The best way to do this would be via an environment variable. Currently adding custom env variable to images built by the repository template is not supported, so you would need to build your own docker image in order to do that.

A manual workaround would be to add the image version as an env var to the container on the Compute Module configuration page.

1 Like