Code Monkey home page Code Monkey logo

mlflow-tracking-server-gcp-deployment's Introduction

MLFlow Tracking Server

Prerequisites

Install gcloud and gsutil command-line tools.

How to deploy MLFlow Tracking Server on a VM on GCP?

Step 1) Database creation

MLFlow uses a database in order to store logged parameters, and metrics. This repository assumes that you are going to use a serverless PostgreSQL database that is running on GCP. If you would like to use this repository, you need to create a new serverles PostgreSQL instance on GCP. Please follow these steps:

  1. Create a serverless PostgreSQL instance on GCP,
  2. Create a new user: Users -> ADD USER ACCOUNT, and save its password to GCP Secret Manager,
  3. Create a new database: Databases -> CREATE DATABASE,

Step 2) Create a GSC Bucket

MLFlow needs a large storage to store your artifacts. So you need to create a GCS Bucket for MLFlow:

  1. Create Bucket

Step 3) Set Environment Variables

Next, you need create 2 files in order to set some environment variables. Please create these files:

  1. .envs/.gcp
  2. .envs/.tracking-server

There is already example of how these files should look like in .envs directory:

  1. .envs/.gcp-example
  2. .envs/.tracking-server-example

Step 4) Deployment

After everything is ready you can call:

make deploy IMAGE_TAG=<docker-image-tag>

As IMAGE_TAG, you can specify anything you like. A docker image will be built and pushed to GCP Docker Registery, and the given IMAGE_TAG will be its tag.

Step 5) Check if everything is working

Since this setup doesn't use expernal IP, you need ssh tunneling in order to view the web API.

  1. Check VM Instances, to see if your VM was created,
  2. Run gcloud compute ssh <vm-instance-name> --zone <vm-instance-zone> --tunnel-through-iap -- -N -L 610 0:localhost:6100
  3. Check http://localhost:6100 if your MLFlow instance is running.
  4. Run python ./examples/connecting-to-tracking-server.py to see if everything is working.

Step 6) Finally

Happy experimentation! :)

mlflow-tracking-server-gcp-deployment's People

Contributors

emkademy avatar

Stargazers

Luiz Simões avatar  avatar

Watchers

 avatar

Forkers

raipra yinglilu

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.