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 further instructions for using the accelerator directive and additional options #5488

Conversation

adamrtalbot
Copy link
Collaborator

@adamrtalbot adamrtalbot commented Nov 8, 2024

Extends the accelerator documentation to clarify that further requirements might be needed.

This wasn't obvious from the existing docs so I felt like it needed to be clarified.

@adamrtalbot adamrtalbot requested a review from a team as a code owner November 8, 2024 14:08
Copy link

netlify bot commented Nov 8, 2024

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 712f95d
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/672e1b4d783fa900080619bd
😎 Deploy Preview https://deploy-preview-5488--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -232,6 +232,10 @@ The above examples will request 4 GPUs of type `nvidia-tesla-k80`.
This directive is only used by certain executors. Refer to the {ref}`executor-page` page to see which executors support this directive.
:::

:::{note}
Additional options may be required to fully enable the use of accelerators. When using containers with GPUs, you must pass the GPU drivers through to the container. For Docker, this requires the option `--gpus all` in the docker run command. For Apptainer/Singularity, this requires the option `--nv`. The specific implementation details depend on the accelerator and container type being used.
Copy link
Member

Choose a reason for hiding this comment

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

um, should nextflow takes care of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure - it's tricky. Let's focus on Docker.

If you have more than 1 GPU, you might want to use 1 per-process and add --gpus '"device=1"', --gpus '"device=2"' etc. or give it all of them with --gpus all. On the other hand, some cloud platforms handle this for you and therefore adding anything raises an error. This is assuming you are using an nvidia card and they don't change the syntax. Not sure how it corresponds to AMD or another brand of GPU.

Similarly, what if I'm not using GPUs? For an FGPA this might be something like '--device /dev/dri'.

So it's complicated. I'd like for Nextflow to handle it for you but there's a long list of options.

Copy link
Member

Choose a reason for hiding this comment

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

good point

@pditommaso pditommaso merged commit 4b90852 into nextflow-io:master Nov 8, 2024
11 checks passed
@adamrtalbot adamrtalbot deleted the document_accelerator_more_instructions_required branch November 18, 2024 09:10
alberto-miranda pushed a commit to alberto-miranda/nextflow that referenced this pull request Nov 19, 2024
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

Successfully merging this pull request may close these issues.

2 participants