Giter Club home page Giter Club logo

azure-batch-python's Introduction

What is in this repo?

Simple example of executing Python as Batch Tasks.

What is required?

  • Azure Storage Account with Hierarchical Namespaces (Data Lake) enabled.
  • Storage container provisioned on the storage account with files in the root of the container.
  • User Managed Identity with Blob Data Contributor permisions to the Data Lake.
  • Azure Batch Pool created with the User Managed Identity and references setup.ps1. as a Start Task Example: powershell .\setup.ps1
    • Image used for Batch Pool is: Publisher = microsoft-dsvm, Offer = dsvm-win-2019, and Sku = winserver-2019.
  • Create config.py with the following values in the directory of the Orchestration script

Example config.py

BATCH_ACCOUNT_NAME = ''  # Your batch account name
BATCH_ACCOUNT_KEY = ''  # Your batch account key
BATCH_ACCOUNT_URL = ''  # Your batch account URL

POOL_ID = ''  # Your Pool Name
JOB_ID = ''  # Job Name

CLIENT_ID = '' # User Managed Identity Client ID
STORAGE_ACCOUNT = '' # Name of storage account
STORAGE_CONTAINER = '' # Name of storage account container with files

Example run of orchestrator.py

pip install -r requirements.txt
python .\orchestrator.py jobname file.txt file2.txt file3.txt

This will create a job and 3 tasks associated. The nodes will run storage.py and copy the files to an output folder on the same container. In this example, file.txt, file2.txt, and file3.txt would need to be in the root of the storage container for the tasks to succeed.

azure-batch-python's People

Contributors

lukearp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.