fix: namespace temp directories by username to avoid multi-user conflicts#152
Closed
Alm0stSurely wants to merge 1 commit intoaqlaboratory:mainfrom
Closed
fix: namespace temp directories by username to avoid multi-user conflicts#152Alm0stSurely wants to merge 1 commit intoaqlaboratory:mainfrom
Alm0stSurely wants to merge 1 commit intoaqlaboratory:mainfrom
Conversation
…icts Fixes aqlaboratory#150. Replaces hardcoded /tmp paths with user-namespaced directories to prevent PermissionError when multiple users run OpenFold3 on the same machine. Changes: - colabfold_msa_server.py: /tmp/of3_colabfold_msas/ → /tmp/of3-<user>/colabfold_msas/ - template.py: /tmp/of3_template_data/ → /tmp/of3-<user>/template_data/ - jackhmmer.py: /tmp/ramdisk/ → /tmp/of3-<user>/ramdisk/ Pattern follows pytest's approach: /tmp/pytest-of-<user>/
This was referenced Mar 31, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
As reported in #150, OpenFold3 uses hardcoded paths under
/tmp/for temporary directories. On multi-user machines, this causesPermissionErrorwhen user A creates a directory (e.g.,/tmp/of3_colabfold_msas/) and user B tries to write to it.Affected paths:
/tmp/of3_colabfold_msas/openfold3/core/data/tools/colabfold_msa_server.py:1000/tmp/of3_template_data/openfold3/core/data/pipelines/preprocessing/template.py:1605/tmp/ramdisk/openfold3/core/data/tools/jackhmmer.py:206Analysis
The issue occurs because:
Solution
Namespace the temporary directories by username, following the pattern used by pytest (
/tmp/pytest-of-{user}/):This ensures each user gets their own isolated directory hierarchy, preventing permission conflicts while maintaining backward compatibility (users can still override via configuration).
Changes
colabfold_msa_server.py: Addedgetpassimport, namespaced the default MSA output directorytemplate.py: Addedgetpassimport, namespaced the default template data directoryjackhmmer.py: Addedgetpassandtempfileimports, namespaced the ramdisk directory with automatic directory creationTesting
python3 -m py_compileon all modified files/tmppaths remain in the modified filesNotes