1. Running from a command line terminal¶
1.1. For a Docker installation¶
Start the OpenCMISS-Iron Docker container by executing the following command (ensure that there are no trailing spaces following the end-of-line deliminators):
1.1.1. Running the Docker container¶
1.1.1.1. Linux¶
Open a new terminal on your host machine.
Run the following:
docker run \ --rm \ --name opencmiss-iron \ -it \ -v ~/oc/opt:/home/jovyan/work \ -v ~/oc/usr/local:/home/jovyan/.local \ -v ~/oc/usr/cache:/home/jovyan/.cache \ -v ~/oc/usr/etc/jupyter:/etc/jupyter \ -v ~/oc/usr/bin/:/usr/local/bin \ prasadbabarendagamage/opencmiss-iron:1.0-minimal-ssh start.sh
Important
Ensure that there are no trailing spaces following the end of line backslash deliminators.
Important
Repeat the above command if you recieve an error like: ‘docker: Error response from daemon’.
1.1.1.2. Mac¶
Open a new terminal on your host machine.
Check that you are using the bash shell:
echo $SHELL
If the command above does not print
/bin/bashthen start a bash shell:bash
Run the following:
docker run \ --rm \ --name opencmiss-iron \ -it \ -v ~/oc/opt:/home/jovyan/work \ -v ~/oc/usr/local:/home/jovyan/.local \ -v ~/oc/usr/cache:/home/jovyan/.cache \ -v ~/oc/usr/etc/jupyter:/etc/jupyter \ -v ~/oc/usr/bin/:/usr/local/bin \ prasadbabarendagamage/opencmiss-iron:1.0-minimal-ssh start.sh
Important
Ensure that there are no trailing spaces following the end of line backslash deliminators.
Important
Repeat the above command if you recieve an error like: ‘docker: Error response from daemon’.
1.1.1.3. Windows¶
Open a new PowerShell on your host machine (don’t use a standard terminal, as it does not support commands that span multiple lines).
Run the following:
docker run ` --rm ` --name opencmiss-iron ` -it ` -v c/Users/${env:UserName}/Documents/oc/opt:/home/jovyan/work ` -v c/Users/${env:UserName}/Documents/oc/usr/local:/home/jovyan/.local ` -v c/Users/${env:UserName}/Documents/oc/usr/cache:/home/jovyan/.cache ` -v c/Users/${env:UserName}/Documents/oc/usr/etc/jupyter:/etc/jupyter ` -v c/Users/${env:UserName}/Documents/oc/usr/bin/:/usr/local/bin/ ` prasadbabarendagamage/opencmiss-iron:1.0-minimal-ssh start.sh
Important
Ensure that there are no trailing spaces following the end-of-line tilda deliminators.
Important
Repeat the above command if you recieve an error like: ‘docker: Error response from daemon’.
1.1.2. Running OpenCMISS-Iron from the Docker container¶
The command in the previous section will open a new bash terminal within the running OpenCMISS-Iron Docker container as shown below:
Start bash terminal in running container
In the Docker terminal, either:
run python from the terminal:
python
and load the OpenCMISS-Iron python module:
# Import python modules from opencmiss.iron import iron
or run an python script containing OpenCMISS-Iron library calls directly from the terminal:
python your_python_script.py ```