Skip to content

Python executable from config file#623

Merged
guillaumeeb merged 5 commits intodask:mainfrom
fnattino:default-python
Feb 9, 2024
Merged

Python executable from config file#623
guillaumeeb merged 5 commits intodask:mainfrom
fnattino:default-python

Conversation

@fnattino
Copy link
Contributor

@fnattino fnattino commented Feb 5, 2024

Hi there!

I encountered the same issue as #517, also for a similar (the same?) use case.

I am running Dask Jobqueue on a SLURM system where all Python applications have to run inside (Apptainer) containers. Thus, I would like to be able to configure Dask jobqueue to use a containerized Python executable.

Currently, I can specify a custom Python path using the Dask Jobqueue Python API, but I cannot do it via the config file. It would be nice to allow for such feature, especially for users who use the Jupyter dask-lab extension, which relies uniquely on the values from the config files.

Introducing the changes as in this PR allows me to set the following in the Dask config file, so that all workers spawned by the cluster run inside containers:

jobqueue:
  slurm:
    python: 'apptainer exec oras://ghcr.io/fnattino/test-jupyterdask-image-apptainer:latest python'

@guillaumeeb
Copy link
Member

Thanks! I think you need to reformat some files using black.

@guillaumeeb
Copy link
Member

Thanks, merging!

@guillaumeeb guillaumeeb merged commit 926cbb5 into dask:main Feb 9, 2024
@fnattino fnattino deleted the default-python branch February 9, 2024 15:11
@fnattino fnattino mentioned this pull request Feb 10, 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