Skip to content

fix: multi-user machine permission errors on /tmp created dirs#158

Merged
jandom merged 3 commits intomainfrom
jandom/2026-03/fix/multi-user-tmp-permission-conflict
Mar 31, 2026
Merged

fix: multi-user machine permission errors on /tmp created dirs#158
jandom merged 3 commits intomainfrom
jandom/2026-03/fix/multi-user-tmp-permission-conflict

Conversation

@jandom
Copy link
Copy Markdown
Collaborator

@jandom jandom commented Mar 31, 2026

Summary

Fix shared /tmp directories that cause PermissionError on multi-user machines.

Introduces a centralized get_of3_tmpdir() utility that namespaces temp dirs per user, following the same convention as pytest (/tmp/pytest-of-alice//tmp/of3-of-alice/).

Changes

  • New get_of3_tmpdir(subdir) in openfold3/core/data/tools/utils.py — single source of truth for OF3 temp directories
  • Each user gets /tmp/of3-of-$USERNAME/<subdir>/ — no more cross-user permission conflicts
  • Respects $TMPDIR, $TEMP, $TMP and other platform conventions via tempfile.gettempdir()
  • Migrated colabfold_msa_server.py, template.py, and jackhmmer.py off hardcoded /tmp paths
  • Added 9 tests in test_utils.py covering path structure, isolation, idempotency, and $TMPDIR support

Related Issues

Testing

pytest openfold3/tests/core/data/tools/test_utils.py

Other Notes

- each user gets /tmp/of3-of-$USERNAME
- respects TMPDIR and other env vars
- all the colabfold and jackhammer code is moved int
- tests
- fixes #150
@jandom jandom requested a review from jnwei March 31, 2026 09:46
@jandom jandom self-assigned this Mar 31, 2026
@jandom jandom added the safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing. label Mar 31, 2026
Copy link
Copy Markdown
Contributor

@jnwei jnwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, thank you for updating the tmp directory throughout the repo.

Two comments:

  • For the jackhmmer workflow, I am not sure if it is preferable to have the results moved to a user subdirectory. If a user is running a large number of alignments with jackhmmer, chances are that they would want to use the alignments with other users / roles, and may prefer to just change the permissions manually for the directory. @vinay-swamy do you have thoughts about this?

  • Could you also update the full configuration reference doc?
    I think it should just be msa_computation_settings

@jandom
Copy link
Copy Markdown
Collaborator Author

jandom commented Mar 31, 2026

Good shout on the docs – for the jackhammer, it seems to me like it was something super custom to run in a setup where you had /tmp in RAM, so indeed might not be appropriate to store that under. it's also not impacting the original test problem.

@jandom jandom requested a review from jnwei March 31, 2026 11:22
@jandom jandom added safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing. and removed safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing. labels Mar 31, 2026
Copy link
Copy Markdown
Contributor

@jnwei jnwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I would suggest that we leave the tmp pipeline for jackhmmer alone for now, since that is a fairly different pipeline. We can change the tmp dir later if needed.

@jandom
Copy link
Copy Markdown
Collaborator Author

jandom commented Mar 31, 2026

Agreed on jackhammer

@vinay-swamy
Copy link
Copy Markdown
Contributor

tbh I think its better to deprecate the old python based jackhmmer workflow - It would be better to instead point users to the snakemake workflow as that will generally be faster than the previous method

@jandom
Copy link
Copy Markdown
Collaborator Author

jandom commented Mar 31, 2026

tbh I think its better to deprecate the old python based jackhmmer workflow

let's mark as deprecated for Q2 in another PR, and not mess around with it in this PR – thanks @vinay-swamy

@jandom jandom merged commit b03a1be into main Mar 31, 2026
3 checks passed
@jandom jandom deleted the jandom/2026-03/fix/multi-user-tmp-permission-conflict branch March 31, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe-to-test Internal only label used to indicate PRs that are ready for automated CI testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Multi-user machine /tmp/of3-directories cause errors

3 participants