-
Notifications
You must be signed in to change notification settings - Fork 1
Running a simple job
Yurii Rebryk edited this page Jan 13, 2019
·
3 revisions
If you already have an image uploaded to the Neuromation registry, you can create a job from it.
Use neuro job submit
command to create a new job:
$ neuro job submit --cpu 1 --memory 2G registry.staging.neuromation.io/<USERNAME>/platform-api-hello-world:latest
Example output:
Job ID: job-d3761712-4f64-4ac8-a99e-a787efa358bf Status: pending
Shortcuts:
neuro job status job-d3761712-4f64-4ac8-a99e-a787efa358bf # check job status
neuro job monitor job-d3761712-4f64-4ac8-a99e-a787efa358bf # monitor job stdout
neuro job kill job-d3761712-4f64-4ac8-a99e-a787efa358bf # kill job
Use neuro job status
command to get the current job status:
$ neuro job status job-d3761712-4f64-4ac8-a99e-a787efa358bf
Here we can see that the platform is creating our container:
Job: job-d3761712-4f64-4ac8-a99e-a787efa358bf
Owner: rebryk
Status: pending (ContainerCreating)
Image: registry.staging.neuromation.io/rebryk/platform-api-hello-world:latest
Command: None
Resources: Resources(memory=2048, cpu=1.0, gpu=None, shm=False, gpu_model=None)
Created: 2019-01-12T21:46:36.078556+00:00
After a few minutes the job status will change from pending
to running
.
If your job prints anything to stdout
use neuro job monitor
to get its' output:
$ neuro job monitor job-d3761712-4f64-4ac8-a99e-a787efa358bf
The job in the current example doesn't do anything useful, thus it stops immediately after start and its' status changes from running
to succeeded
:
Job: job-d3761712-4f64-4ac8-a99e-a787efa358bf
Owner: rebryk
Status: succeeded
Image: registry.staging.neuromation.io/rebryk/platform-api-hello-world:latest
Command: None
Resources: Resources(memory=2048, cpu=1.0, gpu=None, shm=False, gpu_model=None)
Created: 2019-01-12T21:46:36.078556+00:00
Started: 2019-01-12T21:48:02.186104+00:00
Finished: 2019-01-12T21:48:02.186104+00:00
But in other cases, if you want to stop the job, you can kill it:
$ neuro job kill job-d3761712-4f64-4ac8-a99e-a787efa358bf