Checkmark Down-pointing chevron =facebooklinklinkedin Linux logo Apple logo Ongoing indicator +Left-facing arrowRight-facing arrowCheckmarkDown-pointing chevronLeft-pointing chevronRight-pointing chevronUp-pointing chevrontwitter Windows logo x

Part 2 — Running a job

Nerd is designed around running (batch) jobs. A job is a computation that takes some input data, runs an application to do operations on this data and stores the results. Because applications are packaged as Images, no setup or configuration is necessary. A simulation is a great example: it takes some input dataset, runs the simulation and outputs the results.

We’ve created our own CO2 calculator and packaged it as an Image. It calculates the CO2 savings of the Nerdalize cloud. We’ll use it to show you how to use Nerd.

Starting a job

Running a basic job is as simple as starting it. You’ll have to provide the name of the application and it may be useful to give the job a name, so you can easily find it among your other jobs.

Our CO2 calculator is called nerdalize/co2-calculator. Run the following to run it:

$ nerd job run --name=co2-calc nerdalize/co2-calculator

Customizing your job using arguments

Many applications use arguments as a way to configure options or provide some input data. To do so when you run your application using Nerd, simply put the arguments after the image name.

Our CO2 calculator allows you to pass the number of homes. Run the following to run it for 30 households:

$ nerd job run --name=large-co2-calc nerdalize/co2-calculator 30

Viewing progress & log output

You’ve started two jobs now. To see all of your jobs and check up on them run:

$ nerd job list

This shows you information about all of your jobs. Most importantly it shows you whether they’ve finished or whether they’re still running or waiting for resources to become available.

Applications also commonly generate logs that are shown in your Terminal if you run the application on your computer. You can also easily get this log output for any job run using Nerd.

To view the log output of your second job, run:

$ nerd job logs large-co2-calc

That’s how to run a job

You’ve used nerd job run, nerd job list & nerd job logs to run a job and download its logs. Awesome! Let’s continue to the next part to learn about datasets and using them to run jobs with input and output files.