From 4938dbf857ca37d2d8deec5b7fd47262b6339f3a Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Thu, 5 Sep 2024 12:42:01 +0000 Subject: [PATCH] Build cctools and run a probably-broken taskvine vs kubernetes test config --- Dockerfile | 9 +++++++-- runme.sh | 3 ++- taskvine_k8s_kind.py | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 taskvine_k8s_kind.py diff --git a/Dockerfile b/Dockerfile index cbcf97a7fb..bb6d5f52d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,12 @@ RUN apt-get update && apt-get install -y gcc build-essential make pkg-config mpi RUN python3.12 -m venv /venv -ADD . /src -WORKDIR /src +ADD . /parsl +WORKDIR / +RUN git clone https://github.com/cooperative-computing-lab/cctools +WORKDIR /cctools +RUN . /venv/bin/activate && apt install swig && ./configure --prefix=/ && make && make install +WORKDIR /parsl RUN . /venv/bin/activate && pip3 install '.[kubernetes]' -r test-requirements.txt + diff --git a/runme.sh b/runme.sh index cc016ccbf4..2d5b857747 100644 --- a/runme.sh +++ b/runme.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/bin/bash -e source /venv/bin/activate pytest parsl/tests/ --config ./htex_k8s_kind.py -k 'not issue3328 and not staging_required and not shared_fs' -x --random-order +PYTHONPATH=/usr/lib/python3.12/site-packages/ pytest parsl/tests/ --config ./taskvine_k8s_kind.py -k 'not issue3328 and not staging_required and not shared_fs' -x --random-order diff --git a/taskvine_k8s_kind.py b/taskvine_k8s_kind.py new file mode 100644 index 0000000000..787e9fb396 --- /dev/null +++ b/taskvine_k8s_kind.py @@ -0,0 +1,18 @@ +from parsl.channels import LocalChannel +from parsl.config import Config +from parsl.launchers import SimpleLauncher +from parsl.providers import KubernetesProvider + +from parsl.executors.taskvine import TaskVineExecutor, TaskVineManagerConfig + +def fresh_config(): + return Config(executors=[TaskVineExecutor(manager_config=TaskVineManagerConfig(port=9000), + worker_launch_method='provider', + provider=KubernetesProvider( + worker_init=". /venv/bin/activate", + # pod_name="override-pod-name", # can't use default name because of dots, without own bugfix + image="parsl:ci", + max_mem="2048Gi" # was getting OOM-killing of workers with default... maybe this will help. + ), + + )])