From bdcf4abda7c37e087c141a2b7cc9398b7e71424c Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Fri, 16 Aug 2024 16:00:02 -0400 Subject: [PATCH 1/2] Drop mentions of the docker CLI. --- .circleci/config.yml | 1 - docs/contributors.rst | 26 +------------------------- docs/installation.rst | 17 +++-------------- docs/usage.rst | 19 ------------------- qsiprep/cli/run.py | 1 - qsiprep/config.py | 3 +-- 6 files changed, 5 insertions(+), 62 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f341221..e6e90b6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -420,7 +420,6 @@ jobs: echo "the command ``git fetch --tags --verbose`` and push" echo "them to your fork with ``git push origin --tags``" fi - sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" wrapper/qsiprep_container/qsiprep_docker.py sed -i -E "s/(var version = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" docs/citing.rst sed -i "s/title = {qsiprep}/title = {qsiprep ${CIRCLE_TAG:-$THISVERSION}}/" qsiprep/data/boilerplate.bib # Build docker image diff --git a/docs/contributors.rst b/docs/contributors.rst index 105954d5..a11a2ae8 100644 --- a/docs/contributors.rst +++ b/docs/contributors.rst @@ -19,21 +19,6 @@ Patching working repositories In order to test new code without rebuilding the Docker image, it is possible to mount working repositories as source directories within the container. -The ``qsiprep-docker`` script simplifies this for the most common repositories:: - - -f PATH, --patch-qsiprep PATH - working qsiprep repository (default: None) - -p PATH, --patch-nipype PATH - working nipype repository (default: None) - -For instance, if your repositories are contained in ``$HOME/projects``:: - - $ qsiprep-docker -f $HOME/projects/qsiprep/qsiprep \ - -p $HOME/projects/nipype/nipype \ - -i pennbbl/qsiprep:latest \ - $HOME/fullds005 $HOME/dockerout participant - -Note the ``-i`` flag allows you to specify an image. When invoking ``docker`` directly, the mount options must be specified with the ``-v`` flag:: @@ -48,12 +33,7 @@ For example, :: pennbbl/qsiprep:latest /data /out/out participant \ -w /out/work/ -In order to work directly in the container, pass the ``--shell`` flag to -``qsiprep-docker``:: - - $ qsiprep-docker --shell $HOME/fullds005 $HOME/dockerout participant - -This is the equivalent of using ``--entrypoint=bash`` and omitting the qsiprep +In order to work directly in the container, use ``--entrypoint=bash`` and omit the qsiprep arguments in a ``docker`` command:: $ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \ @@ -111,10 +91,6 @@ repository, located in ``~/projects/qsiprep``: :: To work in this image, replace ``pennbbl/qsiprep:latest`` with ``qsiprep`` in any of the above commands. -This image may be accessed by the ``qsiprep-docker`` wrapper via the -``-i`` flag, e.g. :: - - $ qsiprep-docker -i qsiprep --shell Adding new features to the citation boilerplate diff --git a/docs/installation.rst b/docs/installation.rst index 21a45cba..a5843457 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -20,24 +20,13 @@ Docker Container In order to run qsiprep in a Docker container, Docker must be `installed `_. -Once Docker is installed, the recommended way to run qsiprep is to use the -``qsiprep-docker`` wrapper, which requires Python and an Internet connection -and that you install the ``qsiprep-container`` package with ``pip``. -.. note:: If running Docker Desktop on MacOS (or via Docker Desktop), be sure to set +.. note:: + If running Docker Desktop on MacOS (or via Docker Desktop), be sure to set the memory to 6 or more GB. Too little memory assigned to Docker Desktop can result in a message like ``Killed.`` -When run, ``qsiprep-docker`` will generate a Docker command line for you, -print it out for reporting purposes, and then run the command, e.g.:: - - $ qsiprep-docker /path/to/data/dir /path/to/output/dir participant - RUNNING: docker run --rm -it -v /path/to/data/dir:/data \ - -v /path/to_output/dir:/out pennbbl/qsiprep:latest \ - /data /out participant - ... - -You may also invoke ``docker`` directly:: +You may invoke ``docker`` directly:: $ docker run -ti --rm \ -v /filepath/to/data/dir \ diff --git a/docs/usage.rst b/docs/usage.rst index 6825be19..2debef61 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -30,25 +30,6 @@ Command-Line Arguments :nodefaultconst: -The docker wrapper CLI -====================== - -.. argparse:: - :ref: qsiprep_docker.get_parser - :prog: qsiprep-docker - :nodefault: - :nodefaultconst: - - -The singularity wrapper CLI -============================= - -.. argparse:: - :ref: qsiprep_singularity.get_parser - :prog: qsiprep-docker - :nodefault: - :nodefaultconst: - Note on using CUDA ================== diff --git a/qsiprep/cli/run.py b/qsiprep/cli/run.py index cd8b0b2b..9fcf7e62 100644 --- a/qsiprep/cli/run.py +++ b/qsiprep/cli/run.py @@ -157,7 +157,6 @@ def main(): if config.environment.exec_env in ( "singularity", "docker", - "qsiprep-docker", ): boiler_file = Path("") / boiler_file.relative_to( config.execution.output_dir diff --git a/qsiprep/config.py b/qsiprep/config.py index c35d2bad..ba75b221 100644 --- a/qsiprep/config.py +++ b/qsiprep/config.py @@ -165,8 +165,7 @@ _exec_env = "singularity" _cgroup = Path("/proc/1/cgroup") if _cgroup.exists() and "docker" in _cgroup.read_text(): - _docker_ver = os.getenv("DOCKER_VERSION_8395080871") - _exec_env = "qsiprep-docker" if _docker_ver else "docker" + _exec_env = "docker" del _cgroup _fs_license = os.getenv("FS_LICENSE") From 842f368034f98f56a9f2f86e3282927f5a45218a Mon Sep 17 00:00:00 2001 From: Matt Cieslak Date: Fri, 23 Aug 2024 12:52:30 -0400 Subject: [PATCH 2/2] Update docs/contributors.rst --- docs/contributors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributors.rst b/docs/contributors.rst index a11a2ae8..47f46327 100644 --- a/docs/contributors.rst +++ b/docs/contributors.rst @@ -33,7 +33,7 @@ For example, :: pennbbl/qsiprep:latest /data /out/out participant \ -w /out/work/ -In order to work directly in the container, use ``--entrypoint=bash`` and omit the qsiprep +In order to work directly in the container, use ``--entrypoint=bash`` arguments in a ``docker`` command:: $ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \