Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --pwd flag to singularity command line string #15

Open
PabloNA97 opened this issue Oct 5, 2023 · 4 comments
Open

Add --pwd flag to singularity command line string #15

PabloNA97 opened this issue Oct 5, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@PabloNA97
Copy link

The --pwd flag changes the initial working directory inside the container. Here I outline why I think it would be a good idea to include it:

I have a biobb workflow running biobb of pydock3 (These are not yet shared but I will do it at some point). pydock3 is run from a singularity container. The issue here is that pydock3 makes assumptions regarding where to find each input/output file with respect to the working directory. Thus in the biobb_pydock module I wrote, the --pwd flag is used to fix the working directory inside the container and avoid errors inside the container (I can explain in more detail if needed).

I was using a modified version of biobb_common in which I added the --pwd option in biobb_object.py -> BiobbObject -> create_cmd_line:

        if self.container_working_dir:
            singularity_cmd.append('--pwd')
            singularity_cmd.append(self.container_working_dir)

For now I will keep using the modified environment to run the workflow but it would be nice if the singularity execution could include this option as well (I think container_working_dir is already used with docker)

@PabloNA97
Copy link
Author

I think that adding:

        if self.container_working_dir:
            singularity_cmd.append("--pwd")
            singularity_cmd.append(self.container_working_dir)

To line 293 of biobb_common.py would do the trick :)

@gbayarri gbayarri added the enhancement New feature or request label Oct 5, 2023
@gbayarri
Copy link
Contributor

gbayarri commented Oct 5, 2023

Hi, we will take it into account for the next issue.

Cheers.

Copy link
Contributor

github-actions bot commented Nov 5, 2023

This issue is stale because it has been open for 30 days with no activity. If there is no more activity in the following 14 days it will be automatically closed.

@github-actions github-actions bot added the stale label Nov 5, 2023
@gbayarri gbayarri reopened this Nov 13, 2023
@github-actions github-actions bot removed the stale label Nov 14, 2023
Copy link
Contributor

This issue is stale because it has been open for 30 days with no activity. If there is no more activity in the following 14 days it will be automatically closed.

@github-actions github-actions bot added the stale label Dec 14, 2023
@gbayarri gbayarri reopened this Dec 22, 2023
@github-actions github-actions bot removed the stale label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants