Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Docker wrapper #52

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,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/qsirecon_container/qsirecon_docker.py
sed -i -E "s/(var version = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" docs/citing.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: Change this in the docs PR

sed -i "s/title = {qsirecon}/title = {qsirecon ${CIRCLE_TAG:-$THISVERSION}}/" qsirecon/data/boilerplate.bib
# Build docker image
Expand Down
26 changes: 1 addition & 25 deletions docs/contributors.rst
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is gone in the docs PR

Original file line number Diff line number Diff line change
Expand Up @@ -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 ``qsirecon-docker`` script simplifies this for the most common repositories::

-f PATH, --patch-qsirecon PATH
working qsirecon repository (default: None)
-p PATH, --patch-nipype PATH
working nipype repository (default: None)

For instance, if your repositories are contained in ``$HOME/projects``::

$ qsirecon-docker -f $HOME/projects/qsirecon/qsirecon \
-p $HOME/projects/nipype/nipype \
-i pennlinc/qsirecon: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::
Expand All @@ -48,12 +33,7 @@ For example, ::
pennlinc/qsirecon:latest /data /out/out participant \
-w /out/work/

In order to work directly in the container, pass the ``--shell`` flag to
``qsirecon-docker``::

$ qsirecon-docker --shell $HOME/fullds005 $HOME/dockerout participant

This is the equivalent of using ``--entrypoint=bash`` and omitting the qsirecon
In order to work directly in the container, use ``--entrypoint=bash`` and omit the qsirecon
arguments in a ``docker`` command::

$ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \
Expand Down Expand Up @@ -111,10 +91,6 @@ repository, located in ``~/projects/qsirecon``: ::

To work in this image, replace ``pennlinc/qsirecon:latest`` with
``qsirecon`` in any of the above commands.
This image may be accessed by the ``qsirecon-docker`` wrapper via the
``-i`` flag, e.g. ::

$ qsirecon-docker -i qsirecon --shell


Adding new features to the citation boilerplate
Expand Down
14 changes: 1 addition & 13 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,12 @@ Docker Container

In order to run qsirecon in a Docker container, Docker must be `installed
<https://docs.docker.com/engine/installation/>`_.
Once Docker is installed, the recommended way to run qsirecon is to use the
``qsirecon-docker`` wrapper, which requires Python and an Internet connection
and that you install the ``qsirecon-container`` package with ``pip``.

.. 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, ``qsirecon-docker`` will generate a Docker command line for you,
print it out for reporting purposes, and then run the command, e.g.::

$ qsirecon-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 pennlinc/qsirecon:latest \
/data /out participant
...

You may also invoke ``docker`` directly::
You may invoke ``docker`` directly::

$ docker run -ti --rm \
-v /filepath/to/data/dir \
Expand Down
11 changes: 5 additions & 6 deletions docs/reconstruction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ information about how to customize these, see :ref:`custom_reconstruction`.
To use a pre-packaged workflow, simply provide the name from the leftmost column above for the
``--recon-spec`` argument. For example::

$ qsirecon-docker \
$ qsirecon \
/output/from/qsiprep \
/path/for/reconstruction/outputs \
participant \
Expand Down Expand Up @@ -163,7 +163,7 @@ and from ``qsirecon``::

You can run::

$ qsirecon-docker \
$ qsirecon \
derivatives/qsiprep derivatives participant \
--recon_spec mrtrix_multishell_msmt_ACT-hsvs \
--freesurfer-input derivatives/freesurfer \
Expand Down Expand Up @@ -518,7 +518,7 @@ Executing the reconstruction pipeline
Assuming this file is called ``qgi_scalar_export.json`` and you've installed
``qsirecon-container`` you can execute this pipeline with::

$ qsirecon-docker \
$ qsirecon \
/output/from/qsiprep \
/where/my/reconstructed/data/goes \
participant \
Expand Down Expand Up @@ -601,9 +601,8 @@ Where ``"node_names"`` are the text names of the regions in ``"my_custom_atlas"`
section.

The directory containing ``atlas_config.json`` and the atlas nifti files should be mounted in
the container at ``/atlas/qsirecon_atlases``. If using ``qsirecon-docker`` or
``qsirecon-singularity`` this can be done with ``--custom-atlases /path/to/my/atlases`` or
if you're running on your own system (not recommended) you can set the environment variable
the container at ``/atlas/qsirecon_atlases``.
If you're running on your own system (not recommended) you can set the environment variable
``QSIRECON_ATLAS=/path/to/my/atlases``.

The nifti images should be registered to the
Expand Down
19 changes: 0 additions & 19 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@ Command-Line Arguments
:nodefaultconst:


The docker wrapper CLI
======================

.. argparse::
:ref: qsirecon_docker.get_parser
:prog: qsirecon-docker
:nodefault:
:nodefaultconst:


The singularity wrapper CLI
=============================

.. argparse::
:ref: qsirecon_singularity.get_parser
:prog: qsirecon-docker
:nodefault:
:nodefaultconst:

Note on using CUDA
==================

Expand Down
1 change: 0 additions & 1 deletion qsirecon/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ def main():
if config.environment.exec_env in (
"singularity",
"docker",
"qsirecon-docker",
):
boiler_file = Path("<OUTPUT_PATH>") / boiler_file.relative_to(
config.execution.output_dir
Expand Down
3 changes: 1 addition & 2 deletions qsirecon/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "qsirecon-docker" if _docker_ver else "docker"
_exec_env = "docker"
del _cgroup

_fs_license = os.getenv("FS_LICENSE")
Expand Down
27 changes: 0 additions & 27 deletions wrapper/LICENSE

This file was deleted.

48 changes: 0 additions & 48 deletions wrapper/pyproject.toml

This file was deleted.

Empty file.
Loading