Git Product home page Git Product logo

ci-workshop-app's Introduction

Continuous Intelligence Workshop

A demo on how to apply continuous delivery principles to train, test and deploy ML models.

Setup

Note:

  • If you encounter any errors, please refer to FAQs for a list of common errors and how to fix them.
  • [Windows users] If you're new to Docker, please use Git Bash to run the commands below

Setup instructions

  1. Please ensure you've completed the pre-requisite setup
  2. Fork repository: https://github.com/davified/ci-workshop-app
  3. Clone repository: git clone https://github.com/YOUR_USERNAME/ci-workshop-app
  4. Start Docker on your desktop (Note: Wait for Docker to complete startup before running the subsequent commands. You'll know when startup is completed when the docker icon in your taskbar stops animating)
  5. Build docker image
# [Mac/Linux users]
docker build . -t ci-workshop-app --build-arg user=$(whoami)

# [Windows users]
MSYS_NO_PATHCONV=1 docker build . -t ci-workshop-app --build-arg user=$(whoami)
  1. Start docker container
# [Mac/Linux users]
docker run -it -v $(pwd):/home/ci-workshop-app -p 8080:8080 ci-workshop-app bash

# [Windows users]
winpty docker run -it -v C:\\Users\\path\\to\\your\\ci-workshop-app:/home/ci-workshop-app -p 8080:8080 ci-workshop-app bash
# Note: to find the path, you can run `pwd` in git bash, and manually replace forward slashes (/) with double backslashes (\\)
! Pre-workshop setup stops here
### Other useful docker commands ###
# See list of running containers
docker ps

# Start a bash shell in a running container when it’s running
docker exec -it <container-id> bash

Now you're ready to roll!

Common commands (run these in the container)

# Add some color to your terminal
source bin/color_my_terminal.sh

# Run unit tests
nosetests

# Train model
python src/train.py

# Start flask app
python src/app.py

# Make requests to your app
# 1. In your browser, visit http://localhost:8080
# 2. In another terminal in the container, run:
bin/predict.sh http://localhost:8080

# You can also use this script to test your deployed application later:
bin/predict.sh http://my-app.herokuapp.com

IDE configuration

Please refer to FAQs for instructions on configuring VS Code or PyCharm.

Set up CD pipeline

Instructions for setting up your CD pipeline are in docs/CD.md. To keep this example simple, we will deploy to heroku.

Once the CD pipeline is set up, you only need to git add, git commit and git push your code changes, and the CD pipeline will do everything (train, test, deploy) for you.

ci-workshop-app's People

Contributors

arunma avatar col avatar davidtan-tw avatar davified avatar nhung121 avatar siddharthlshah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.