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

  1. Open a new terminal on your host machine.

  2. 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

  1. Open a new terminal on your host machine.

  2. Check that you are using the bash shell:

    echo $SHELL
    
  3. If the command above does not print /bin/bash then start a bash shell:

    bash
    
  4. 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

  1. Open a new PowerShell on your host machine (don’t use a standard terminal, as it does not support commands that span multiple lines).

  2. 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: ../../_images/docker_start_bash_terminal.pngStart bash terminal in running container

In the Docker terminal, either:

  1. run python from the terminal:

    python
    

    and load the OpenCMISS-Iron python module:

    # Import python modules
    from opencmiss.iron import iron
    
  2. or run an python script containing OpenCMISS-Iron library calls directly from the terminal:

    python your_python_script.py
      ```