Giter Club home page Giter Club logo

mlops-boat's Introduction

MLOPS Boat

This project contains the code to provision a secure MLOPS environment in Azure following the architecture documented in the Azure documentation.

Getting started

  1. Setup dev environment. There are two options: start the devcontainer, which contains all the dependencies needed, or setup the development environment manually (see Section: Setup dev environment).

  2. Make a copy of .env.template and set the values.

cp .env.template .env
  1. Check the project management commands. This project uses the Python library invoke for project management (which is similar to using GNU Make). The tasks are defined in the tasks.py file. To display the commands available execute invoke --list.

Before being able to execute any of the Terraform commands, make sure you log in to Azure using az cli or setup the service principal ARM_* environment variables (see documentation for details).

Setup dev environment manually

Install pre-requisites:

  • Python3.8 (the Azureml Python SDK is not compatible with newer Python versions).
  • Poetry (Python package manager).
  • Terraform v1.0 or above.

Create Python virtual environment, install dependencies and activate virtual environment:

poetry install
source `poetry env info --path`/bin/activate

Dependency management

Poetry is in charge of the dependency management in this project. Direct dependencies are defined in pyproject.toml (along with other project configuration - such as the linting config and description); the poetry.lock contains all the dependencies and their versions.

To add a new dependency, execute poetry add <package name>="<version>"; in general, you just want to use the latest stable version and for that you use "*" as version (the actual version installed is pinned in the poetry.lock and won't be upgraded unless poetry update is executed).

You can also indicate that a dependency should be only installed in dev (for instance, the linters - mypy or flake8), for that add the --dev parameter: poetry add --dev <package name>="<version>".

When running poetry install, if a poetry.lock exists in the project, the packages pinned to the versions in that file will be installed.

Issues

This section describes future work and blockers/issues that need to be solved.

Architecure

Private Azure ML workspace Terraform provisioned: see docs.

Create ssh tunnel to route traffic through the remote server and setup socks in the local browser to use this tunnel.

ssh -vv -ND 8080 user@yourserver

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
--user-data-dir="$HOME/proxy-profile"
--proxy-server="socks5://localhost:8080"

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.