Closed kongxiangya closed 2 years ago
Hi @kongxiangya
I have cwltool
installed via pip
, via pip install cwltool=3.1.20220406080846
. Same version you used with Conda, I think.
If the image is created using "cwltool.Dockerfile", the following error message is displayed:
Could you share what steps you are exactly using to run the workflow? Both of the commands below work for me with your attached files.
(venv) kinow@ranma:/tmp/cwl$ cwltool test.cwl
...
...
INFO [job cutadapt_v2] Max memory used: 0MiB
INFO [job cutadapt_v2] completed success
INFO [step cutadapt_v2] completed success
INFO [workflow cutadaptparallel_v2] completed success
INFO [step cutadaptparallel_v2] completed success
INFO [workflow ] completed success
{}
INFO Final process status is success
(venv) kinow@ranma:/tmp/cwl$ cwltool --parallel test.cwl
...
...
INFO [job cutadapt_v2] Max memory used: 0MiB
INFO [job cutadapt_v2] completed success
INFO [step cutadapt_v2] completed success
INFO [workflow cutadaptparallel_v2] completed success
INFO [step cutadaptparallel_v2] completed success
INFO [workflow ] completed success
{}
INFO Final process status is success
Hi @kinow
Thanks for your answer
My run command is the same : cwltool --parallel test.cwl
I also tried using PIP to install CWLTOOL pip install cwltool=3.1.20220406080846
and it worked fine
Now my problem should be that if I build the image using cwltool.Dockerfile, the error will occur
my Dockerfile is:
FROM python:3.8-alpine as builder
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linux-headers
WORKDIR /cwltool
COPY . .
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple toml -rmypy-requirements.txt "$(grep ruamel requirements.txt)" \
"$(grep schema.salad requirements.txt)"
# schema-salad is needed to be installed (this time as pure Python) for
# cwltool + mypyc
RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=typeshed pip wheel -i https://pypi.tuna.tsinghua.edu.cn/simple --no-binary schema-salad --wheel-dir=/wheels .[deps]
RUN rm /wheels/schema_salad*
RUN pip install black
RUN SCHEMA_SALAD_USE_MYPYC=1 MYPYPATH=typeshed pip wheel -i https://pypi.tuna.tsinghua.edu.cn/simple --no-binary schema-salad \
$(grep schema.salad requirements.txt) black --wheel-dir=/wheels
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --force-reinstall --no-index --no-warn-script-location --root=/pythonroot/ /wheels/*.whl
# --force-reinstall to install our new mypyc compiled schema-salad package
FROM python:3.8-alpine as module
LABEL maintainer peter.amstutz@curri.com
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache docker nodejs graphviz libxml2 libxslt
COPY --from=builder /pythonroot/ /
FROM python:3.8-alpine
LABEL maintainer peter.amstutz@curri.com
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache docker nodejs graphviz libxml2 libxslt
COPY --from=builder /pythonroot/ /
COPY cwltool-in-docker.sh /cwltool-in-docker.sh
WORKDIR /error
ENTRYPOINT ["/cwltool-in-docker.sh"]
Relevant files are downloaded from https://github.com/common-workflow-language/cwltool/releases/tag/3.1.20220406080846
My image by Dockerfile: cwltool:3.1.20220406080846
This might be a mypyc failure. Can you try again with CWLTOOL_USE_MYPYC=0
?
Hi @mr-c
Thanks for your help. CWLTOOL_USE_MYPYC=0
solved my problem
Glad to hear it, @kongxiangya ; Did you build from the latest development code of cwltool (which uses mypy 0.950), or the latest cwltool pypi release (which uses mypy 0.942)?
I'm curious if the latest version of mypy still have this issue. If so, I will stop publishing binary wheels of cwltool so that others don't have this problem.
I was able to reproduce this problem using mypy 0.942 and with mypy 0.950 it is fixed; I'll make a new cwltool release so that others aren't affected. Thanks!
I have tested version 3.1.20220502060230 and SET CWLTOOL_USE_MYPYC=1
without any error. Thanks.
workflow:
If the image is created using "cwltool.Dockerfile", the following error message is displayed:
However, if use cwLTool installed directly by Conda, it will work without error
The file used for the test: test.zip