Skip to main content

A Python based runner for docker images.

Project description

bisi

Bisi (BuildItShipIt) is a tool to help run workloads locally and in the cloud. Bisi lets you define and run all your containerized resources from one file stored at the root of your project all in python.

Currently supported providers are:

  • Locally with docker
  • AWS Batch

Installation

Prerequisites

Docker is required to use bisi

The awscli and credentials are required to use the AWS Batch features.

pip install awscli
aws configure

Install bisi

Install bisi from pypi

pip install bisi

Quickstart

Getting started with bisi is as simple as creating a Dockerfile and a bisi_resources.py file.

Create a clean directory.

mkdir bisi_example
cd bisi_example

Run the following to create an example Dockerfile.

echo 'FROM python:slim
RUN pip install numpy
ADD . /bisi
WORKDIR /bisi' > Dockerfile

Next define an example workload as a python script.

echo 'import numpy
print(numpy.random.rand())' > workload.py

Finally create a bisi_resources.py file to tell bisi about our Dockerfile and how to run our workload.

echo 'import bisi.resources as bsr

df = bsr.Dockerfile(name="bisi_example", file="Dockerfile")

bsr.Job(name="numpy_example", entrypoint="workload.py", dockerfile=df)' > bisi_resources.py

Now you can use bisi to build your dockerfile and run it.

bisi build
bisi run numpy_example

From here you are free to use bisi to run anything from data processing to deep learning training in docker! Check out the sections below for more detailed usage.

AWS Batch

With AWS Batch you can run your batch workloads in the cloud at any scale and bisi makes that easy for you. To get started follow the AWS Batch Setup Guide to stand up a minimal Batch infrastructure setup running on CPU instances.

Once you have a batch job queue, you can configure bisi to utilize your batch infrastructure to run jobs. Assuming you ran the quickstart guide you can run the following to update your bisi_resources.py file.

echo 'import bisi.resources as bsr
from bisi.resources.config import BatchJobConfig, ECRConfig

df = bsr.Dockerfile(name="bisi_example", file="Dockerfile", ecr_config=ECRConfig("bisi_example"))

bsr.Job(name="numpy_example", entrypoint="workload.py", dockerfile=df, 
        batch_config=BatchJobConfig(jobQueue="bisi-test-jq"))' > bisi_resources.py

This configures bisi to upload your docker image to Amazon ECR and tells bisi where to submit your batch job. Next you can deploy your container and run it in batch.

bisi deploy
bisi run --provider aws numpy_example

At this point you can navigate to https://console.aws.amazon.com/batch/home to see your pending job. From there you can also navigate to the job to see the logs for the job.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bisi-0.0.3.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bisi-0.0.3-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file bisi-0.0.3.tar.gz.

File metadata

  • Download URL: bisi-0.0.3.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for bisi-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4f7dbe1071d93a4405883f88a3abbeff2cdbcdd42fc3b93ae9d14157afafef08
MD5 2832a8e6d972a66aaab807ea59a0f852
BLAKE2b-256 8fb81a7cbe4284ecee163dbca6d89a5923c689a4dc40317266b9c297ecc0f200

See more details on using hashes here.

File details

Details for the file bisi-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: bisi-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for bisi-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 10c3d5bec27f6016200e356d433e3d8d47a956ad36f222f142edd18670f8a2bb
MD5 466e39f3684369d14877818187542c28
BLAKE2b-256 88cc5383d0abdcfb4d34247b11ba697833d1990890da07bf0c2b9b7f07812f40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page