azure batch samples for python - sample 2

AJG 436 Reputation points
2020-09-01T12:06:52.85+00:00

I am looking at azure batch sample 2 for python:

https://github.com/Azure-Samples/azure-batch-samples/blob/master/Python/Batch/sample2_pools_and_resourcefiles.py

As far as I can see, the 'command line' for the pool StartTask simply executes a python script

ie: "python " + _SIMPLE_TASK_NAME,

and the task generated within the job does exactly the same thing.

this implies that python is available on the node before the StartTask is executed - but I was under the impression from the other documentation - that the purpose of the pool StartTask is to to prepare the nodes, eg by installing any software (such as python) that the jobs will require.

I cannot see any other initialization/preparation steps in this example - does this mean that python is pre-installed and available on the node VMs, or only for some images, or ? ........

A

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
336 questions
0 comments No comments
{count} votes

Accepted answer
  1. whoward-msft 2,766 Reputation points
    2020-09-02T19:28:52.617+00:00

    Thanks for the question @AJG ,

    All Linux nodes can execute Python scripts by default. You can prepare custom images for nodes but the default Linux nodes can execute python scripts without any additional work. Your interpretation of the code sample is correct in that StartTask executes a python script on a node from the pool. For more information about Nodes and Pools see this doc here. If this answered your question please mark this answer as accepted.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.