# Get current tagged version at runtime

**URL:** <https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252>\
**Category:** Ask the Community\
**Tags:** compute-modules\
**Created:** [October 15, 2025, 1:42pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252 "2025-10-15T13:42:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschrader](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mschrader](https://community.palantir.com/u/mschrader)\
**Post date:** [October 15, 2025, 1:42pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252/1 "2025-10-15T13:42:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@joe](https://community.palantir.com/u/joe)\
**Post date:** [October 15, 2025, 2:40pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252/2 "2025-10-15T14:40:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mschrader](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mschrader](https://community.palantir.com/u/mschrader)\
**Post date:** [October 15, 2025, 2:42pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252/3 "2025-10-15T14:42:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![skruyswyk](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@skruyswyk](https://community.palantir.com/u/skruyswyk)\
**Post date:** [October 15, 2025, 2:42pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252/4 "2025-10-15T14:42:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [October 10, 2026, 2:43pm UTC](https://community.palantir.com/t/get-current-tagged-version-at-runtime/5252/5 "2026-10-10T14:43:17Z")

</div>

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