Skip to content

Commit 9bc4e45

Browse files
authored
[dask] updated dask version to 2022.3 on 2.0 and 2.1, 2024.06 on 2.2 (#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
1 parent 94e3f19 commit 9bc4e45

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

dask/dask.sh

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,36 @@
2121

2222
set -euxo pipefail
2323

24-
readonly DASK_VERSION='2022.1'
24+
function os_id() {
25+
grep '^ID=' /etc/os-release | cut -d= -f2 | xargs
26+
}
27+
28+
function os_version() {
29+
grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | xargs
30+
}
31+
32+
function os_codename() {
33+
grep '^VERSION_CODENAME=' /etc/os-release | cut -d= -f2 | xargs
34+
}
35+
36+
function is_debian() {
37+
[[ "$(os_id)" == 'debian' ]]
38+
}
39+
40+
function is_debian11() {
41+
is_debian && [[ "$(os_version)" == '11'* ]]
42+
}
43+
44+
function is_debian12() {
45+
is_debian && [[ "$(os_version)" == '12'* ]]
46+
}
47+
48+
if is_debian12 ; then
49+
DASK_VERSION='2024.6'
50+
else
51+
DASK_VERSION='2022.3'
52+
fi
53+
readonly DASK_VERSION
2554

2655
readonly DEFAULT_CONDA_ENV=$(conda info --base)
2756
readonly DASK_YARN_CONFIG_DIR=/etc/dask/
@@ -343,10 +372,8 @@ EOF
343372

344373

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

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

0 commit comments

Comments
 (0)