Skip to content

PermissionError: [Errno 13] Permission denied: 'outputs' #99

Description

@DStrelak

Hi,

We are preparing RFantibody for SBGrid. During deployment testing, we noticed that hydra attempts to log directly into the project's installation directory instead of the user's current working directory or a temporary directory. This prevents users without write permissions to the installation folder from running the software.

Steps to reproduce

  1. Install the package (https://github.com/RosettaCommons/RFantibody#local-installation-without-docker)
  2. Switch to a different user without write privileges to the installation directory.
  3. Navigate to a separate test directory and run:
rfdiffusion -t ./examples/example_inputs/rsv_site3.pdb -f ./examples/example_inputs/hu-4D5-8_Fv.pdb --output example_outputs/ab_des  -n 20  -l "H1:7,H2:6,H3:5-13,L1:8-13,L2:7,L3:9-11" -h "T305,T456"

Expected Behavior
The software should execute and save outputs/logs strictly within the user's current working directory or a defined temporary directory or in the stdout / stderr

Actual Behavior
The execution fails because Hydra tries to create a dated output directory where the user lacks write access:

Running RFdiffusion with 20 designs...
Target: /.../rfantibody/examples/example_inputs/rsv_site3.pdb
Framework: /.../rfantibody/examples/example_inputs/hu-4D5-8_Fv.pdb
Design loops: H1:7,H2:6,H3:5-13,L1:8-13,L2:7,L3:9-11
/programs/x86_64-linux/rfantibody/.pixi/envs/default/lib/python3.10/site-packages/rfantibody/rfdiffusion/util.py:224: UserWarning: Using torch.cross without specifying the dim arg is deprecated.
Please either pass the dim explicitly or simply use torch.linalg.cross.
The default value of dim will change to agree with that of linalg.cross in a future release. (Triggered internally at /opt/conda/conda-bld/pytorch_1712608839953/work/aten/src/ATen/native/Cross.cpp:62.)
  Z = torch.cross(Xn,Yn)
/programs/x86_64-linux/rfantibody/.pixi/envs/default/lib/python3.10/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'antibody': Defaults list is missing `_self_`. See https://hydra.cc/docs/1.2/upgrades/1.0_to_1.1/default_composition_order for more information
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/programs/x86_64-linux/rfantibody/.pixi/envs/default/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: 'outputs/2026-05-22/09-38-35'

Note: Failing to run cleanly outside of the installation location severely limits the reusability of this software in Shared/HPC environments.

Proposed Fix
One potential solution is to redirect the Hydra logging behavior to a universal location like /tmp within config/inference/base.yaml (similarly for rf2_predict's config):

YAML
hydra:
  output_subdir: null  
  run:
    dir: .             
  sweep:
    dir: .
    subdir: .

  job_logging:
    handlers:
      file:
        class: logging.FileHandler
        # Redirect the log to /tmp, which is universally writable on all Linux/HPC systems
        filename: /tmp/rfdiffusion_inference.log
        mode: a
        encoding: utf-8

Additionally, we ran into a similar roadblock regarding hardcoded paths, which is detailed here: #95

It would be fantastic if these could be resolved so we can officially provide RFantibody via SBGrid!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions