Skip to content

Commit

Permalink
Merge pull request NeuroDesk#184 from civier/patch-74
Browse files Browse the repository at this point in the history
Update add_tool.md
  • Loading branch information
stebo85 authored Jul 26, 2022
2 parents 08d4f02 + 75f2d6b commit 220ad2e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/en/developers/new_tools/add_tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ Neurodocker is the dependency we use to build containers.
<pre class="language-shell command-line" data-prompt="$"><code>git clone https://github.com/NeuroDesk/neurocontainers/</code></pre>

### Create a new app
1. Copy the directory template and rename to _newapp_ in `neurocontainers/recipes`:
1. Copy the directory template and rename to NEWAPP in `neurocontainers/recipes` (NEWAPP being the name of the application to be displayed in Neurodesk's menu; notice it shouldn't have any special characters):
<pre class="language-shell command-line" data-prompt="$"><code>cd neurocontainers/recipes
cp -R template newapp</code></pre>
cp -R template NEWAPP</code></pre>

2. Create your Container Files:
Modify `build.sh` in `neurocontainers/recipes/newapp` to build your application and update `README.md` (make sure the version is correct in the README!). Notice that the example build script in the template has instructions to build a conatiner for datalad, that may or may not suite your exact needs
<pre class="language-shell command-line" data-prompt="$" data-output="2-3"><code>cd newapp
Modify `build.sh` in `neurocontainers/recipes/NEWAPP` to build your application and update `README.md` (make sure the version is correct in the README!). Notice that the example build script in the template has instructions to build a conatiner for datalad, that may or may not suite your exact needs
<pre class="language-shell command-line" data-prompt="$" data-output="2-3"><code>cd NEWAPP
(edit build.sh as required)
(edit README.md as required)</code></pre>
Upload your application to object storage first if needed, so you can then download it in `build.sh` (ask for instructions about this if you don't know the key, and never share it anywhere public!)

3. Run `update-builders.sh`:
This will auto-create the CI workflow for the application (or manually duplicate the template file and rename all occurances of template to _newapp_)
This will auto-create the CI workflow for the application (or manually duplicate the template file and rename all occurances of template to NEWAPP)
<pre class="language-shell command-line" data-prompt="$"><code>cd ../..
sh update-builders.sh</code></pre>

Expand All @@ -93,7 +93,7 @@ Neurodocker is the dependency we use to build containers.

4. Build and test the container locally
1. run the build script with the debug flag:
<pre class="language-shell command-line" data-prompt="$"><code>cd recipes/newapp
<pre class="language-shell command-line" data-prompt="$"><code>cd recipes/NEWAPP
chmod +x build.sh
./build.sh -ds</code></pre>
2. test running some commands within the container that should be available in your local docker container repository.
Expand All @@ -105,7 +105,7 @@ Neurodocker is the dependency we use to build containers.
3. if your application requires a Matlab Runtime and you get an error about shared library "libmwlaunchermain.so" not found, check which version of the runtime was installed by the build script

5. Update changes in local git repository
<pre class="language-shell command-line" data-prompt="$"><code>git add recipes/newapp/build.sh recipes/newapp/README.md .github/workflows/newapp.yml
<pre class="language-shell command-line" data-prompt="$"><code>git add recipes/NEWAPP/build.sh recipes/NEWAPP/README.md .github/workflows/NEWAPP.yml
git config user.email "the email that you use for github"
git config user.name "your name"
git commit</code></pre>
Expand Down

0 comments on commit 220ad2e

Please sign in to comment.