Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

TODO: Alexander Torres (see 

...

...

)

Table of Contents

Table of Contents

Introduction

This guide will teach you

...

to run a stand alone MATLAB application (i.e. Hello World) locally and in a HySDS cluster. This tutorial uses a compiled Hello_World MATLAB executable which does require a MATLAB license to run. The process used to create the MATLAB executable was followed by the following link: Compiling MATLAB Scripts into Executables to Reduce the Use of Licenses*

*Note that the executable must be compiled on the same OS platform (e.g. Linux, Mac OS, Windows) that it will be executed from 

Requirements

  • Docker

  • MATLAB

  • Configured HySDS Cluster

Running Hello World (Locally)

  1. Git pull the docker_matlab repo into work directory

    Code Block
    git pull https://github.com/aria-jpl/docker_matlab.git .


  2. Build Docker Hello World image from docker_matlab/

    Code Block
    docker build . -f docker/Dockerfile.hello_world -t hello_world:latest


  3. Run hello_world:latest in a Docker container

    Code Block
    docker run --name "hello_world" -ti hello_world:latest /bin/bash 


  4. Execute the hello_world script inside the container

    Code Block
    /home/ops/verdi/ops/hello_world/hello_world 


    The output should look like the following:

    Code Block
    $ /home/ops/verdi/ops/hello_world/hello_world
    Hello World!


Running Hello World (HySDS)

  1. Ensure that your HySDS cluster is up and running by logging into the MOZART instance and running:

    Code Block
    sds status

    If it is not running, run:

    Code Block
    sds start all


  2. Configure the docker_matlab repo as a new job type for continuous integration and deployment

    Code Block
    sds ci add_job -b master https://github.com/aria-jpl/docker_matlab.git s3


  3. Navigate to

...

  1. your ci

...

  1.  instance (e.g. http://<your-ci-instance>:8080) to validate that the jenkins job was configured.

...

  1.  You should see your jenkins job named as "container-builder_<your repo name>_<branch>" (e.g. container-builder_gmanipon_hello_world_master).

...


  1. Image Added



  2. Verify that the jenkins job runs to completion by manually scheduling a build. The jenkins job will build the docker image, publish it to your S3 code bucket, and register the job types into you HySDS cluster. Click on the green arrow and view the console output to validate.

  3. Navigate to

...

  1. your grq

...

  1.  instance (e.g. http://<your-grq-instance>/search)

...

  1. and click on the "On-Demand" button.

    Image Modified

  2. From the On-Demand screen, fill in the highlighted parameters as shown in the figure below and click "Process Now":

    Image Modified

  3. Navigate to

...

  1. your mozart

...

  1.  instance (e.g. http://<your-mozart-instance>/figaro)* to view your job. You can facet on it by looking for the "my_hello_world" tag. The job should go through the  "Queued", "Started", and "Completed" states. 

  2. From your completed job, click on the "work directory" link to view the live work directory on factotum. All STDOUT output will go into

...

  1. the _stdout.txt

...

  1.  file.

    Image Modified
    Image Modified
    Here's

...

  1. what _stdout.txt

...

  1.  should show:

    Image Modified



(lightbulb) Have Questions? Ask a HySDS Developer:

Anyone can join our public Slack channelto learn more about HySDS. JPL employees can join #HySDS-Community

(blue star)

JPLers can also ask HySDS questions atStack Overflow Enterprise

(blue star)

Live Search
placeholderSearch HySDS Wiki