|
19 | 19 | "source": [
|
20 | 20 | "# Docker Image for the interactive Nipype Tutorial\n",
|
21 | 21 | "\n",
|
22 |
| - "If you want to run this Nipype Tutorial with the example dataset locally on your own system, you need to use the docker image, provided under [djarecka/nipype_tutorial](https://hub.docker.com/r/djarecka/nipype_tutorial/). This docker image sets up a Linux environment on your system, with functioning Python, Nipype, FSL, ANTs and SPM12 software package, some example data and all the tutorial notebooks to learn Nipype. Alternatively, you can also build your own docker image from Dockerfile or create a different Dockerfile using [Neurodocker](https://github.com/kaczmarj/neurodocker)." |
| 22 | + "If you want to run this Nipype Tutorial with the example dataset locally on your own system, you need to use the docker image, provided under [miykael/nipype_tutorial](https://hub.docker.com/r/miykael/nipype_tutorial/). This docker image sets up a Linux environment on your system, with functioning Python, Nipype, FSL, ANTs and SPM12 software package, some example data and all the tutorial notebooks to learn Nipype. Alternatively, you can also build your own docker image from Dockerfile or create a different Dockerfile using [Neurodocker](https://github.com/kaczmarj/neurodocker)." |
23 | 23 | ]
|
24 | 24 | },
|
25 | 25 | {
|
|
47 | 47 | "source": [
|
48 | 48 | "# Pulling the Docker image\n",
|
49 | 49 | "\n",
|
50 |
| - "You can download various Docker images, but for this tutorial we will suggest ``djarecka/nipype_tutorial``:\n", |
| 50 | + "You can download various Docker images, but for this tutorial we will suggest ``miykael/nipype_tutorial``:\n", |
51 | 51 | "\n",
|
52 |
| - " docker pull djarecka/nipype_tutorial:latest\n", |
| 52 | + " docker pull miykael/nipype_tutorial:latest\n", |
53 | 53 | " \n",
|
54 | 54 | "Once it's done you can check available images on your system:\n",
|
55 | 55 | "\n",
|
|
64 | 64 | "\n",
|
65 | 65 | "After installing docker on your system and making sure that the ``hello-world`` example was running, we are good to go to start the Nipype Tutorial image. The exact implementation is a bit different for Windows user, but the general commands look similar.\n",
|
66 | 66 | "\n",
|
67 |
| - "The suggested Docker image, djarecka/nipype_tutorial, already contains all tutorial notebooks and data used in the tutorial, so the simplest way to run container is:\n", |
| 67 | + "The suggested Docker image, miykael/nipype_tutorial, already contains all tutorial notebooks and data used in the tutorial, so the simplest way to run container is:\n", |
68 | 68 | "\n",
|
69 |
| - " docker run -it --rm -p 8888:8888 djarecka/nipype_tutorial jupyter notebook\n", |
| 69 | + " docker run -it --rm -p 8888:8888 miykael/nipype_tutorial jupyter notebook\n", |
70 | 70 | " \n",
|
71 | 71 | "However, if you want to use your version of notebooks, safe notebook outputs locally or use youe local data, you can also mount your local directories, e.g.: \n",
|
72 | 72 | "\n",
|
73 |
| - " docker run -it --rm -v /path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /path/to/data/:/data -v /path/to/output/:/output -p 8888:8888 djarecka/nipype_tutorial jupyter notebook\n", |
| 73 | + " docker run -it --rm -v /path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /path/to/data/:/data -v /path/to/output/:/output -p 8888:8888 miykael/nipype_tutorial jupyter notebook\n", |
74 | 74 | "\n",
|
75 | 75 | "But what do those flags mean?\n",
|
76 | 76 | "\n",
|
77 | 77 | "- The ``-it`` flag tells docker that it should open an interactive container instance.\n",
|
78 | 78 | "- The ``--rm`` flag tells docker that the container should automatically be removed after we close docker.\n",
|
79 | 79 | "- The ``-p`` flag specifies which port we want to make available for docker.\n",
|
80 | 80 | "- The ``-v`` flag tells docker which folders should be mount to make them accesible inside the container. Here: ``/path/to/nipype_tutorial`` is your local directory where you downloaded [Nipype Tutorial repository](https://github.com/miykael/nipype_tutorial/). ``/path/to/data/`` is a directory where you have dataset [``ds000114``](https://openfmri.org/dataset/ds000114/), and ``/path/to/output`` can be an empty directory that will be used for output. The second part of the ``-v`` flag (here: ``/home/neuro/nipype_tutorial``, ``/data`` or ``/output``) specifies under which path the mounted folders can be found inside the container. **Important**: To use the ``tutorial``, ``data`` and ``output`` folder, you first need to create them on your system!\n",
|
81 |
| - "- ``djarecka/nipype_tutorial`` tells docker which image you want to run.\n", |
| 81 | + "- ``miykael/nipype_tutorial`` tells docker which image you want to run.\n", |
82 | 82 | "- ``jupyter notebook`` tells that you want to run directly the jupyter notebook command within the container. Alternatively, you can also use ``jupyter-lab``, ``bash`` or ``ipython``.\n",
|
83 | 83 | "\n",
|
84 | 84 | "**Note** that when you run this docker image without any more specification, than it will prompt you a URL link in your terminal that you will need to copy paste into your browser to get to the notebooks. "
|
|
117 | 117 | "\n",
|
118 | 118 | "3. Now, we can open run the container with the command from above:\n",
|
119 | 119 | "\n",
|
120 |
| - " `` docker run -it --rm -v /c/Users/username/path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /c/Users/username/path/to/data/:/data -v /c/Users/username/path/to/output/:/output -p 8888:8888 djarecka/nipype_tutorial``\n", |
| 120 | + " `` docker run -it --rm -v /c/Users/username/path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /c/Users/username/path/to/data/:/data -v /c/Users/username/path/to/output/:/output -p 8888:8888 miykael/nipype_tutorial``\n", |
121 | 121 | "\n",
|
122 | 122 | "4. Once the docker image is downloaded, it will show you an URL that looks something like this:\n",
|
123 | 123 | "\n",
|
|
139 | 139 | "\n",
|
140 | 140 | "## Access Docker Container with ``bash`` or ``ipython``\n",
|
141 | 141 | "\n",
|
142 |
| - "You don't have to open a jupyter notebook when you run ``djarecka/nipype_tutorial``. You can also access the docker container directly with ``bash`` or ``ipython`` by adding it to the end of your command, i.e.:\n", |
| 142 | + "You don't have to open a jupyter notebook when you run ``miykael/nipype_tutorial``. You can also access the docker container directly with ``bash`` or ``ipython`` by adding it to the end of your command, i.e.:\n", |
143 | 143 | "\n",
|
144 |
| - " docker run -it --rm -v /path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /path/to/data/:/data -v /path/to/output/:/output -p 8888:8888 djarecka/nipype_tutorial bash\n", |
| 144 | + " docker run -it --rm -v /path/to/nipype_tutorial/:/home/neuro/nipype_tutorial -v /path/to/data/:/data -v /path/to/output/:/output -p 8888:8888 miykael/nipype_tutorial bash\n", |
145 | 145 | "\n",
|
146 | 146 | "This also works with other software commands, such as ``bet`` etc."
|
147 | 147 | ]
|
|
186 | 186 | "If you don't want to depend on a internet connection, you can also export an already downloaded docker image and than later on import it on another PC. To do so, use the following two commands:\n",
|
187 | 187 | "\n",
|
188 | 188 | "\n",
|
189 |
| - " # Export docker image djarecka/nipype_tutorial\n", |
190 |
| - " docker save -o nipype_tutorial.tar djarecka/nipype_tutorial\n", |
| 189 | + " # Export docker image miykael/nipype_tutorial\n", |
| 190 | + " docker save -o nipype_tutorial.tar miykael/nipype_tutorial\n", |
191 | 191 | "\n",
|
192 | 192 | " # Import docker image on another PC\n",
|
193 | 193 | " docker load --input nipype_tutorial.tar\n",
|
|
0 commit comments