Skip to content

Commit 93cd80c

Browse files
committed
wn singularity image
1 parent 5a60b20 commit 93cd80c

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

dask_remote_jobqueue/dask_remote_jobqueue.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __init__(
5454
ssh_url_port: int = 8122,
5555
asynchronous: bool = True, # Set by dask-labextension but not used in this class
5656
sitename: str = "",
57+
singularity_wn_image = "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1",
5758
debug: bool = True,
5859
):
5960
self.__debug = debug
@@ -116,6 +117,8 @@ def __init__(
116117
self.cluster_id: str = ""
117118
self.sitename: str = sitename
118119

120+
self.singularity_wn_image: str = singularity_wn_image
121+
119122
# Jupyter env vars
120123
self.username = (
121124
os.environ.get("JUPYTERHUB_USER", user) + f"-{self.sched_port}.dask-ssh"
@@ -363,7 +366,7 @@ async def _start(self):
363366

364367
if self.start_sched_process is None:
365368
self.start_sched_process = StartDaskScheduler(
366-
weakref.proxy(self), self.start_sched_process_q, os.environ
369+
weakref.proxy(self), self.start_sched_process_q, os.environ, self.singularity_wn_image
367370
)
368371
logger.debug("[_start][start sched process...]")
369372
self.start_sched_process.start()

dask_remote_jobqueue/templates/scheduler.sub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ when_to_transfer_output = ON_EXIT
1010
+SingularityImage = "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/dask-scheduler:v1"
1111
{{ selected_sitename }}
1212
transfer_input_files = start_scheduler.py, scheduler.sh, /ca.crt, /tmp/token, job_submit.sh, job_rm.sh, .bashrc, config.yaml, entrypoint.sh
13-
environment = HOME=./; OIDC_CONFIG_DIR=./.oidc-agent; TUNNEL_SERVICE_IP={{ tunnel_service_ip }}; TUNNEL_SERVICE_PORT={{ tunnel_service_port }}; JHUB_TOKEN={{ token }};JHUB_USER={{ name }};SCHED_PORT={{ sched_port }};DASH_PORT={{ dash_port }};CONTROLLER_PORT={{ controller_port }};REFRESH_TOKEN={{ refresh_token }};IAM_SERVER={{ iam_server }};IAM_CLIENT_ID={{ client_id }};IAM_CLIENT_SECRET={{ client_secret }};_condor_AUTH_SSL_CLIENT_CAFILE={{ htc_ca }};_condor_TOOL_DEBUG={{ htc_debug }};_condor_COLLECTOR_HOST={{ htc_collector }}; _condor_SCHEDD_HOST={{ htc_schedd_host }};_condor_SCHEDD_NAME={{ htc_schedd_name }};_condor_SCITOKENS_FILE={{ htc_scitoken_file }};_condor_SEC_DEFAULT_AUTHENTICATION_METHODS={{ htc_sec_method}}
13+
environment = HOME=./; OIDC_CONFIG_DIR=./.oidc-agent; TUNNEL_SERVICE_IP={{ tunnel_service_ip }}; TUNNEL_SERVICE_PORT={{ tunnel_service_port }}; JHUB_TOKEN={{ token }};JHUB_USER={{ name }};SCHED_PORT={{ sched_port }};DASH_PORT={{ dash_port }};CONTROLLER_PORT={{ controller_port }};REFRESH_TOKEN={{ refresh_token }};IAM_SERVER={{ iam_server }};IAM_CLIENT_ID={{ client_id }};IAM_CLIENT_SECRET={{ client_secret }};_condor_AUTH_SSL_CLIENT_CAFILE={{ htc_ca }};_condor_TOOL_DEBUG={{ htc_debug }};_condor_COLLECTOR_HOST={{ htc_collector }}; _condor_SCHEDD_HOST={{ htc_schedd_host }};_condor_SCHEDD_NAME={{ htc_schedd_name }};_condor_SCITOKENS_FILE={{ htc_scitoken_file }};_condor_SEC_DEFAULT_AUTHENTICATION_METHODS={{ htc_sec_method}};SINGULARITY_WN_IMAGE={{ singularity_wn_image }}
1414
queue

dask_remote_jobqueue/templates/start_scheduler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def __init__(self, *args, **kwargs):
8181
sched_port = int(os.environ.get("SCHED_PORT", "42000"))
8282
dash_port = int(os.environ.get("DASH_PORT", "42001"))
8383
controller_port = int(os.environ.get("CONTROLLER_PORT", "42002"))
84+
singularity_wn_image = os.environ.get("SINGULARITY_WN_IMAGE", "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1")
8485
tunnel_service_ip = os.environ.get(
8586
"TUNNEL_SERVICE_IP", "jhub.131.154.96.124.myip.cloud.infn.it"
8687
)
@@ -113,7 +114,7 @@ def __init__(self, *args, **kwargs):
113114
}
114115
job_extra_vars = {
115116
"+OWNER": '"' + name.split("-")[0] + '"',
116-
"+SingularityImage": '"/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1"',
117+
"+SingularityImage": singularity_wn_image,
117118
"log": "wn.log",
118119
"output": "wn.out",
119120
"error": "wn.error",

dask_remote_jobqueue/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,11 @@ def __init__(
385385
remoteHTCondor: weakref.ProxyType,
386386
queue: "Queue",
387387
environ: os._Environ,
388+
singularity_wn_image: "/cvmfs/images.dodas.infn.it/registry.hub.docker.com/dodasts/root-in-docker:ubuntu22-kernel-v1",
388389
):
389390
logger.debug("[StartDaskScheduler][init]")
390391
super().__init__()
392+
self.singularity_wn_image = singularity_wn_image
391393
self._remoteHTCondor: weakref.ProxyType = remoteHTCondor
392394
self._queue: "Queue" = queue
393395
self._environ: os._Environ = environ
@@ -522,6 +524,7 @@ def run(self):
522524
htc_scitoken_file=self._htc_scitoken_file,
523525
htc_sec_method=self._htc_sec_method,
524526
selected_sitename=selected_sitename,
527+
singularity_wn_image=self.singularity_wn_image
525528
)
526529

527530
logger.debug(f"[StartDaskScheduler][run][{dest.name}]")

version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Distributed under the terms of the Modified BSD License.
33

44
version_info = (
5+
1,
6+
0,
57
0,
6-
5,
7-
9,
88
# "dev", # comment-out this line for a release
99
)
1010
__version__ = ".".join(map(str, version_info))

0 commit comments

Comments
 (0)