From 17d099d37c3990eb13bb50f94e59ce3d9a6a376e Mon Sep 17 00:00:00 2001 From: Jonathan Karr Date: Sun, 5 Dec 2021 20:28:28 -0500 Subject: [PATCH] fix: fixed escaping of arguments to entrypoint of Docker image --- Dockerfile | 6 ++++-- biosimulators_opencor/__main__.py | 2 +- biosimulators_opencor/_version.py | 2 +- scripts/biosimulators-opencor | 4 ++++ setup.py | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 scripts/biosimulators-opencor diff --git a/Dockerfile b/Dockerfile index 3772b06..b46dad1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # VERSION -ARG VERSION=0.0.8 +ARG VERSION=0.0.9 ARG SIMULATOR_VERSION="2021-10-05" # Base OS @@ -57,6 +57,8 @@ ENV VERBOSE=0 \ # - ugo+w permissions to `${OPENCORDIR}/python/bin` are needed because the OpenCOR Python pluging dynamically generates these files RUN mkdir ${HOMEDIR}/Biosimulators_OpenCOR \ && chmod -R ugo+w ${OPENCORDIR}/python/bin +ENV PATH=${OPENCORDIR}/python/bin:$PATH WORKDIR ${HOMEDIR}/Biosimulators_OpenCOR -ENTRYPOINT ["pythonshell", "-m", "biosimulators_opencor"] +COPY scripts/biosimulators-opencor ${OPENCORDIR}/python/bin +ENTRYPOINT ["biosimulators-opencor"] CMD [] diff --git a/biosimulators_opencor/__main__.py b/biosimulators_opencor/__main__.py index 9da77f5..43e5b49 100644 --- a/biosimulators_opencor/__main__.py +++ b/biosimulators_opencor/__main__.py @@ -11,7 +11,7 @@ from .core import exec_sedml_docs_in_combine_archive from biosimulators_utils.simulator.cli import build_cli -App = build_cli('opencor', __version__, +App = build_cli('biosimulators-opencor', __version__, 'OpenCOR', get_simulator_version(), 'https://opencor.ws', exec_sedml_docs_in_combine_archive) diff --git a/biosimulators_opencor/_version.py b/biosimulators_opencor/_version.py index 9123cf0..9d1ffab 100644 --- a/biosimulators_opencor/_version.py +++ b/biosimulators_opencor/_version.py @@ -1 +1 @@ -__version__ = '0.0.8' +__version__ = '0.0.9' diff --git a/scripts/biosimulators-opencor b/scripts/biosimulators-opencor new file mode 100755 index 0000000..354c0ac --- /dev/null +++ b/scripts/biosimulators-opencor @@ -0,0 +1,4 @@ +#!/bin/sh + +opencor_path=$(which OpenCOR) +"$(cd "$(dirname "$opencor_path")"; pwd)/bin/OpenCOR" -c PythonShell -m biosimulators_opencor "$@" diff --git a/setup.py b/setup.py index 1a8e935..90b72c3 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ ], entry_points={ 'console_scripts': [ - 'biosimulators-opencor = biosimulators_opencor.__main__:main', + # 'biosimulators-opencor = biosimulators_opencor.__main__:main', ], }, )