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 option to specify conda env for LSF job #9

Open
pcm32 opened this issue Feb 8, 2022 · 1 comment
Open

Add option to specify conda env for LSF job #9

pcm32 opened this issue Feb 8, 2022 · 1 comment

Comments

@pcm32
Copy link
Member

pcm32 commented Feb 8, 2022

Currently to run an LSF job inside a conda environment different to the current environment (usually this package's), one needs to add some twisted direct invocation of activate and the env with complete paths:

export ENV_COMMAND=". $SOFTWARE/miniconda3/bin/activate $SOFTWARE/miniconda3/envs/my-env"

atlas-lsf \
  -c "$ENV_COMMAND && my-command"

it would be nice if instead we could do:

atlas-lsf \
  -v my-env \
  -c my-command

the script would need to resolve the conda base and then call from there activate and the my-env with their full paths as it is done on the env variable above. Maybe a nice first contribution from @irisdianauy ?

@pcm32 pcm32 changed the title Add option to specify conda env for job Add option to specify conda env for LSF job Feb 8, 2022
@pinin4fjords
Copy link
Member

Just putting the Nextflow equivalent here for further illustration:

source $(conda info --json | awk '/conda_prefix/ { gsub(/"|,/, "", $2); print $2 }')/bin/activate /nfs/production/irene/ma/fg_atlas_sc/nextflow_scxa/envs/salmon-fec68f5d709540071be9f969ca06fcf9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants