Skip to content

Commit 6599f13

Browse files
committed
tmp commit
1 parent 96f104e commit 6599f13

2 files changed

Lines changed: 77 additions & 11 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# docker build --platform amd64 -t wfcommons-dev-streamflow -f Dockerfile.streamflow .
2+
# docker run -it --rm -v `pwd`:/home/wfcommons wfcommons-dev-streamflow /bin/bash
3+
4+
FROM alphaunito/streamflow
5+
6+
LABEL org.containers.image.authors="henric@hawaii.edu"
7+
8+
# update repositories
9+
RUN apt-get update
10+
11+
# set timezone
12+
RUN echo "America/Los_Angeles" > /etc/timezone && export DEBIAN_FRONTEND=noninteractive && apt-get install -y tzdata
13+
14+
# install useful stuff
15+
RUN apt-get -y install pkg-config
16+
RUN apt-get -y install git
17+
RUN apt-get -y install wget
18+
RUN apt-get -y install make
19+
RUN apt-get -y install cmake
20+
RUN apt-get -y install cmake-data
21+
RUN apt-get -y install sudo
22+
RUN apt-get -y install vim --fix-missing
23+
RUN apt-get -y install gcc
24+
RUN apt-get -y install gcc-multilib
25+
26+
# Python stuff
27+
RUN apt-get -y install python3 python3-pip
28+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
29+
RUN python3 -m pip install --break-system-packages pathos pandas filelock
30+
RUN python3 -m pip install --break-system-packages networkx scipy matplotlib
31+
RUN python3 -m pip install --break-system-packages pyyaml jsonschema requests
32+
RUN python3 -m pip install --break-system-packages --upgrade setuptools
33+
34+
# Stress-ng
35+
RUN apt-get -y install stress-ng
36+
37+
# Add wfcommons user
38+
RUN useradd -ms /bin/bash wfcommons
39+
RUN adduser wfcommons sudo
40+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
41+
ENV PATH="$PATH:/home/wfcommons/.local/bin/"
42+
43+
USER wfcommons
44+
WORKDIR /home/wfcommons
45+
# Making this directory world rwx to facilitate testing
46+
RUN chmod -R 777 /home/wfcommons
47+

tests/translators_loggers/test_translators_loggers.py

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def _additional_setup_swiftt(container):
114114
"taskvine": _additional_setup_taskvine,
115115
"makeflow": noop,
116116
"cwl": noop,
117+
"streamflow": noop,
117118
"pegasus": _additional_setup_pegasus,
118119
"swiftt": _additional_setup_swiftt,
119120
}
@@ -189,6 +190,19 @@ def run_workflow_cwl(container, num_tasks, str_dirpath):
189190
# and there is a 2* because there is a message for the job and for the step)
190191
assert (output.decode().count("completed success") == 3 + 2 *num_tasks)
191192

193+
def run_workflow_streamflow(container, num_tasks, str_dirpath):
194+
# Run the workflow!
195+
# Note that the input file is hardcoded and Blast-specific
196+
sys.stderr.write("TODO: RUN THE STREAMFLOW WORKFLOW!!!")
197+
time.sleep(100000)
198+
# exit_code, output = container.exec_run(cmd="cwltool ./main.cwl --split_fasta_00000001_input ./data/workflow_infile_0001 ",
199+
# user="wfcommons", stdout=True, stderr=True)
200+
# # Check sanity
201+
# assert (exit_code == 0)
202+
# # this below is ugly (the 3 is for "workflow", "compile_output_files" and "compile_log_files",
203+
# # and there is a 2* because there is a message for the job and for the step)
204+
# assert (output.decode().count("completed success") == 3 + 2 *num_tasks)
205+
192206
def run_workflow_pegasus(container, num_tasks, str_dirpath):
193207
# Run the workflow!
194208
exit_code, output = container.exec_run(cmd="bash /home/wfcommons/run_workflow.sh",
@@ -217,6 +231,7 @@ def run_workflow_swiftt(container, num_tasks, str_dirpath):
217231
"taskvine": run_workflow_taskvine,
218232
"makeflow": run_workflow_makeflow,
219233
"cwl": run_workflow_cwl,
234+
"streamflow": run_workflow_streamflow,
220235
"pegasus": run_workflow_pegasus,
221236
"swiftt": run_workflow_swiftt,
222237
}
@@ -231,6 +246,7 @@ def run_workflow_swiftt(container, num_tasks, str_dirpath):
231246
"taskvine": TaskVineTranslator,
232247
"makeflow": MakeflowTranslator,
233248
"cwl": CWLTranslator,
249+
"streamflow": CWLTranslator,
234250
"pegasus": PegasusTranslator,
235251
"swiftt": SwiftTTranslator,
236252
}
@@ -241,17 +257,18 @@ class TestTranslators:
241257
@pytest.mark.parametrize(
242258
"backend",
243259
[
244-
"swiftt",
245-
"dask",
246-
"parsl",
247-
"nextflow",
248-
"nextflow_subworkflow",
249-
"airflow",
250-
"bash",
251-
"taskvine",
252-
"makeflow",
253-
"cwl",
254-
"pegasus",
260+
# "swiftt",
261+
# "dask",
262+
# "parsl",
263+
# "nextflow",
264+
# "nextflow_subworkflow",
265+
# "airflow",
266+
# "bash",
267+
# "taskvine",
268+
# "makeflow",
269+
# "cwl",
270+
"streamflow",
271+
# "pegasus",
255272
])
256273
@pytest.mark.unit
257274
# @pytest.mark.skip(reason="tmp")
@@ -305,6 +322,8 @@ def test_translator(self, backend) -> None:
305322
parser = TaskVineLogsParser(dirpath / "vine-run-info/most-recent/vine-logs", filenames_to_ignore=["cpu-benchmark","stress-ng", "wfbench"])
306323
elif backend == "makeflow":
307324
parser = MakeflowLogsParser(execution_dir = dirpath, resource_monitor_logs_dir = dirpath / "monitor_data/")
325+
elif backend == "streamflow":
326+
parsed =
308327
else:
309328
parser = None
310329

0 commit comments

Comments
 (0)