xmanager-slurm 0.4.13__tar.gz → 0.4.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xmanager-slurm might be problematic. Click here for more details.

Files changed (123) hide show
  1. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/PKG-INFO +1 -1
  2. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/pyproject.toml +1 -1
  3. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/uv.lock +1 -1
  4. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/execution.py +10 -0
  5. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/fragments/monitor.bash.j2 +2 -0
  6. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/job.bash.j2 +7 -0
  7. xmanager_slurm-0.4.14/xm_slurm/templates/slurm/library/retry.bash +62 -0
  8. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/runtimes/apptainer.bash.j2 +8 -7
  9. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/runtimes/podman.bash.j2 +4 -3
  10. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.devcontainer.json +0 -0
  11. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.github/workflows/ci.yml +0 -0
  12. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.github/workflows/deploy-docs.yml +0 -0
  13. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.gitignore +0 -0
  14. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.pre-commit-config.yaml +0 -0
  15. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.python-version +0 -0
  16. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/.vscode/settings.json +0 -0
  17. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/LICENSE.md +0 -0
  18. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/README.md +0 -0
  19. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/api/executables.rst +0 -0
  20. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/api/executors.rst +0 -0
  21. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/api/packageables.rst +0 -0
  22. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/assets/workflow-dark.svg +0 -0
  23. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/assets/workflow-light.svg +0 -0
  24. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/conf.py +0 -0
  25. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/getting-started/xmanager.md +0 -0
  26. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/guides/index.md +0 -0
  27. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/guides/remote-dev.md +0 -0
  28. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/docs/index.md +0 -0
  29. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/conda/environment.yml +0 -0
  30. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/conda/launch.py +0 -0
  31. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/conda/main.py +0 -0
  32. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/conda/pyproject.toml +0 -0
  33. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/custom-dockerfile/Dockerfile +0 -0
  34. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/custom-dockerfile/launch.py +0 -0
  35. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/custom-dockerfile/pyproject.toml +0 -0
  36. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-array-sweep/launch.py +0 -0
  37. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-array-sweep/main.py +0 -0
  38. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-array-sweep/pyproject.toml +0 -0
  39. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-array-sweep/uv.lock +0 -0
  40. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-dependencies/eval.py +0 -0
  41. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-dependencies/launch.py +0 -0
  42. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-dependencies/pyproject.toml +0 -0
  43. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-dependencies/train.py +0 -0
  44. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-dependencies/uv.lock +0 -0
  45. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-group/Dockerfile +0 -0
  46. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-group/launch.py +0 -0
  47. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-group/pyproject.toml +0 -0
  48. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-group/uv.lock +0 -0
  49. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-timeout/launch.py +0 -0
  50. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-timeout/main.py +0 -0
  51. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-timeout/pyproject.toml +0 -0
  52. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/job-timeout/uv.lock +0 -0
  53. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/metadata/launch.py +0 -0
  54. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/metadata/main.py +0 -0
  55. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/metadata/pyproject.toml +0 -0
  56. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/metadata/requirements.txt +0 -0
  57. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/parameter-controller/launch.py +0 -0
  58. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/parameter-controller/main.py +0 -0
  59. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/parameter-controller/pyproject.toml +0 -0
  60. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/parameter-controller/requirements.txt +0 -0
  61. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/pip/launch.py +0 -0
  62. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/pip/main.py +0 -0
  63. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/pip/pyproject.toml +0 -0
  64. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/pip/requirements.txt +0 -0
  65. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/uv/launch.py +0 -0
  66. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/uv/pyproject.toml +0 -0
  67. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/examples/uv/uv.lock +0 -0
  68. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/conftest.py +0 -0
  69. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/Dockerfile +0 -0
  70. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/README.md +0 -0
  71. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/cgroup.conf +0 -0
  72. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/docker-compose.yml +0 -0
  73. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/docker-entrypoint.sh +0 -0
  74. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/host_ed25519 +0 -0
  75. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/host_ed25519.pub +0 -0
  76. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/id_ed25519 +0 -0
  77. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/id_ed25519.pub +0 -0
  78. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/slurm.conf +0 -0
  79. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/slurmdbd.conf +0 -0
  80. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/fixtures/slurm/sshd_config +0 -0
  81. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/integration/test_remote_execution.py +0 -0
  82. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/tests/test_dependencies.py +0 -0
  83. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/__init__.py +0 -0
  84. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/api/__init__.py +0 -0
  85. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/api/abc.py +0 -0
  86. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/api/models.py +0 -0
  87. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/api/sqlite/client.py +0 -0
  88. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/api/web/client.py +0 -0
  89. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/batching.py +0 -0
  90. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/config.py +0 -0
  91. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/console.py +0 -0
  92. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/constants.py +0 -0
  93. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/contrib/__init__.py +0 -0
  94. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/contrib/clusters/__init__.py +0 -0
  95. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/contrib/clusters/drac.py +0 -0
  96. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/dependencies.py +0 -0
  97. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/executables.py +0 -0
  98. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/executors.py +0 -0
  99. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/experiment.py +0 -0
  100. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/experimental/parameter_controller.py +0 -0
  101. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/filesystem.py +0 -0
  102. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/job_blocks.py +0 -0
  103. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/metadata_context.py +0 -0
  104. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packageables.py +0 -0
  105. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packaging/__init__.py +0 -0
  106. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packaging/docker.py +0 -0
  107. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packaging/registry.py +0 -0
  108. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packaging/router.py +0 -0
  109. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/packaging/utils.py +0 -0
  110. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/resources.py +0 -0
  111. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/scripts/_cloudpickle.py +0 -0
  112. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/scripts/cli.py +0 -0
  113. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/status.py +0 -0
  114. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/docker/docker-bake.hcl.j2 +0 -0
  115. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/docker/mamba.Dockerfile +0 -0
  116. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/docker/python.Dockerfile +0 -0
  117. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/docker/uv.Dockerfile +0 -0
  118. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/entrypoint.bash.j2 +0 -0
  119. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/fragments/proxy.bash.j2 +0 -0
  120. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/job-array.bash.j2 +0 -0
  121. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/templates/slurm/job-group.bash.j2 +0 -0
  122. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/types.py +0 -0
  123. {xmanager_slurm-0.4.13 → xmanager_slurm-0.4.14}/xm_slurm/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmanager-slurm
3
- Version: 0.4.13
3
+ Version: 0.4.14
4
4
  Summary: Slurm backend for XManager.
5
5
  Project-URL: GitHub, https://github.com/jessefarebro/xm-slurm
6
6
  Author-email: Jesse Farebrother <jfarebro@cs.mcgill.ca>
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
  [project]
6
6
  name = "xmanager-slurm"
7
7
  description = "Slurm backend for XManager."
8
- version = "0.4.13"
8
+ version = "0.4.14"
9
9
  # readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "MIT" }
@@ -2251,7 +2251,7 @@ wheels = [
2251
2251
 
2252
2252
  [[package]]
2253
2253
  name = "xmanager-slurm"
2254
- version = "0.4.13"
2254
+ version = "0.4.14"
2255
2255
  source = { editable = "." }
2256
2256
  dependencies = [
2257
2257
  { name = "aiofile" },
@@ -3,6 +3,8 @@ import collections.abc
3
3
  import dataclasses
4
4
  import functools
5
5
  import hashlib
6
+ import importlib
7
+ import importlib.resources
6
8
  import logging
7
9
  import operator
8
10
  import os
@@ -311,6 +313,14 @@ def get_template_env(runtime: ContainerRuntime) -> j2.Environment:
311
313
  template_env.globals["raise"] = _raise_template_exception
312
314
  template_env.globals["operator"] = operator
313
315
 
316
+ # Iterate over stdlib files and insert them into the template environment
317
+ stdlib = []
318
+ for file in importlib.resources.files("xm_slurm.templates.slurm.library").iterdir():
319
+ if not file.is_file() or not file.name.endswith(".bash"):
320
+ continue
321
+ stdlib.append(file.read_text())
322
+ template_env.globals["stdlib"] = stdlib
323
+
314
324
  entrypoint_template = template_env.get_template("entrypoint.bash.j2")
315
325
  template_env.globals.update(entrypoint_template.module.__dict__)
316
326
 
@@ -25,6 +25,7 @@ __xm_slurm_wait_for_children() {
25
25
  while [ ${#children[@]} -gt 0 ]; do
26
26
  {% endraw %}
27
27
  echo "INFO: Waiting for child processes to finish..."
28
+ set +e
28
29
  {% if requeue_on_timeout %}
29
30
  # Wait on either one of the child processes or the timeout process.
30
31
  wait -n -p child_pid "${children[@]}" "${timeout_pid}"
@@ -32,6 +33,7 @@ __xm_slurm_wait_for_children() {
32
33
  wait -n -p child_pid "${children[@]}"
33
34
  {% endif %}
34
35
  local child_exit_code=$?
36
+ set -e
35
37
 
36
38
  {% if requeue_on_timeout %}
37
39
  # If the finished process is the watchdog, trigger the timeout handling.
@@ -27,6 +27,13 @@
27
27
  {% endblock directives %}
28
28
  set -Eeuxo pipefail
29
29
 
30
+ {% if stdlib %}
31
+ # --- Helper functions ---
32
+ {% for fn in stdlib %}
33
+ {{ fn }}
34
+ {% endfor %}
35
+ {% endif %}
36
+
30
37
  {% block prolog %}
31
38
  {% if cluster.prolog %}
32
39
  {{- cluster.prolog -}}
@@ -0,0 +1,62 @@
1
+ # retry: rerun a command if it exits with certain codes
2
+ # Options:
3
+ # -c CODE Retry on this exit code (repeatable).
4
+ # -n N Max attempts (incl. first). Default: unlimited
5
+ # -d SECS Initial delay before first retry. Default: 1
6
+ # -b FACTOR Integer backoff multiplier per retry. Default: 1 (no backoff)
7
+ # -q Quiet (no logs)
8
+ # Usage:
9
+ # retry [-c CODE ...] [-n N] [-d SECS] [-b FACTOR] [-q] -- cmd arg1 arg2 ...
10
+ retry() {
11
+ local -a codes=()
12
+ local -i max=-1 delay=1 backoff=1 quiet=0 status
13
+ local opt OPTIND=1
14
+
15
+ while getopts ":c:n:d:b:q" opt; do
16
+ case "$opt" in
17
+ c) codes+=("$OPTARG") ;;
18
+ n) max=$OPTARG ;;
19
+ d) delay=$OPTARG ;;
20
+ b) backoff=$OPTARG ;;
21
+ q) quiet=1 ;;
22
+ :) printf 'retry: option -%s requires an argument\n' "$OPTARG" >&2; return 2 ;;
23
+ \?) printf 'retry: invalid option -- %s\n' "$OPTARG" >&2; return 2 ;;
24
+ esac
25
+ done
26
+ shift $((OPTIND-1))
27
+ (( $# )) || { printf 'retry: missing command\n' >&2; return 2; }
28
+
29
+ ((${#codes[@]})) || { printf 'retry: no return codes specified\n' >&2; return 2; }
30
+
31
+ for ((attempt=1; ; attempt++)); do
32
+ if "$@"; then # safe with set -e (exception context)
33
+ return 0
34
+ else
35
+ status=$? # capture failing status immediately
36
+ fi
37
+
38
+ # retryable?
39
+ local retryable=0 c
40
+ for c in "${codes[@]}"; do
41
+ (( status == c )) && { retryable=1; break; }
42
+ done
43
+
44
+ # stop if not retryable OR we've just hit the max attempt
45
+ if (( !retryable )) || (( max >= 0 && attempt >= max )); then
46
+ (( quiet )) || {
47
+ if (( attempt > 1 )); then
48
+ printf 'retry: giving up after %d attempts; last exit=%d\n' "$attempt" "$status" >&2
49
+ else
50
+ printf 'retry: command failed; exit=%d\n' "$status" >&2
51
+ fi
52
+ }
53
+ return "$status" # propagate exact code; errexit will catch
54
+ fi
55
+
56
+ (( quiet )) || printf 'retry: attempt %d failed with %d; retrying in %ds...\n' \
57
+ "$attempt" "$status" "$delay" >&2
58
+ sleep "$delay" || : # never trip set -e if sleep errors
59
+ (( delay *= backoff ))
60
+ done
61
+ }
62
+ export -f retry
@@ -5,16 +5,17 @@
5
5
  # container-workdir will be our container's scratch directory
6
6
  mkdir -p "$SLURM_TMPDIR"/{container,container-workdir,container-overlay}
7
7
 
8
+ retry -c 255 -n 10 -d 1 -b 2 -- \
8
9
  {% if job.executable.credentials %}
9
- env {{ runtime | upper }}_DOCKER_USERNAME="{{ job.executable.credentials.username }}" {{ runtime | upper }}_DOCKER_PASSWORD="{{ job.executable.credentials.password }}" time {{ runtime }} build \
10
+ env {{ runtime | upper }}_DOCKER_USERNAME="{{ job.executable.credentials.username }}" {{ runtime | upper }}_DOCKER_PASSWORD="{{ job.executable.credentials.password }}" time {{ runtime }} build \
10
11
  {% else %}
11
- time {{ runtime }} build \
12
+ time {{ runtime }} build \
12
13
  {% endif %}
13
- --force \
14
- --sandbox \
15
- --fix-perms \
16
- "$SLURM_TMPDIR"/container \
17
- docker://{{ job.executable.image }}
14
+ --force \
15
+ --sandbox \
16
+ --fix-perms \
17
+ "$SLURM_TMPDIR"/container \
18
+ docker://{{ job.executable.image }}
18
19
 
19
20
  {% if runtime == "singularity" and cluster.mounts %}
20
21
  {% for source, dest in cluster.mounts.items() %}
@@ -1,9 +1,10 @@
1
1
  {% macro run(cluster, job) -%}
2
- time podman pull \
2
+ retry -c 255 -n 10 -d 1 -b 2 -- \
3
+ time podman pull \
3
4
  {% if job.executable.credentials %}
4
- --creds {{ job.executable.credentials.username }}:{{ job.executable.credentials.password }} \
5
+ --creds {{ job.executable.credentials.username }}:{{ job.executable.credentials.password }} \
5
6
  {% endif %}
6
- {{ job.executable.image }}
7
+ {{ job.executable.image }}
7
8
 
8
9
  cat << 'ENTRYPOINT_EOF' > "$SLURM_TMPDIR"/xm-slurm-entrypoint.sh
9
10
  {{ entrypoint(cluster, job) }}