Skip to content

Commit

Permalink
[dask] updated dask version to 2022.3 on 2.0 and 2.1, 2024.06 on 2.2 (#…
Browse files Browse the repository at this point in the history
…1194)

* [dask] updated dask version to 2022.3

* also re-combined the mamba and conda commands since the versions
  mesh on this release.

* use the latest dask when on debian12
  • Loading branch information
cjac authored Jul 4, 2024
1 parent 94e3f19 commit 9bc4e45
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions dask/dask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,36 @@

set -euxo pipefail

readonly DASK_VERSION='2022.1'
function os_id() {
grep '^ID=' /etc/os-release | cut -d= -f2 | xargs
}

function os_version() {
grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | xargs
}

function os_codename() {
grep '^VERSION_CODENAME=' /etc/os-release | cut -d= -f2 | xargs
}

function is_debian() {
[[ "$(os_id)" == 'debian' ]]
}

function is_debian11() {
is_debian && [[ "$(os_version)" == '11'* ]]
}

function is_debian12() {
is_debian && [[ "$(os_version)" == '12'* ]]
}

if is_debian12 ; then
DASK_VERSION='2024.6'
else
DASK_VERSION='2022.3'
fi
readonly DASK_VERSION

readonly DEFAULT_CONDA_ENV=$(conda info --base)
readonly DASK_YARN_CONFIG_DIR=/etc/dask/
Expand Down Expand Up @@ -343,10 +372,8 @@ EOF


function main() {
#Install dask with the help of conda as installing with mamba causes version conflicts
execute_with_retries "conda install -y dask=${DASK_VERSION}"
# Install conda packages
execute_with_retries "mamba install -y ${CONDA_PACKAGES[*]}"
# Install dask + conda packages using mamba
execute_with_retries "mamba install -y dask=${DASK_VERSION} ${CONDA_PACKAGES[*]}"

if [[ "${DASK_RUNTIME}" == "yarn" ]]; then
# Create Dask YARN config file
Expand Down

0 comments on commit 9bc4e45

Please sign in to comment.