Skip to content

javiber/k8s-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-demo

Example of a couple of use cases for kubernetes that could be useful in ML.

Demos

  1. First demo shows how to train a pytorch model for MNIST as a Kubernetes Job. See train for more details
  2. Second demo shows how to use canary deployments on a simple API. See api for more details

Local setup

  1. Install docker
  2. Clone this repo
  3. Optionally but recommended:
    1. Install pyenv and run pyenv install
    2. Setup a virtualenv with python -m venv .venv and activate with source .venv/bin/activate
    3. Install dev requirements with pip install -r requirements.txt
  4. Install kubectl

Cluster setup

I only tested this on minikube, for the first demo I used my local GPU on minikube which requires sudo for alternatives look into train.

Minikube setup

  1. Install minikube
  2. Use this script to setup a GPU-enabled cluster or a vanilla cluster.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published