Giter VIP home page Giter VIP logo

clouds-app's Introduction

Clouds

Table of Contents

Overview

This repository contains the Clouds project, an interactive web application built with Streamlit, which allows users to select and run different versions of trained machine learning models. This document includes a guide for setting up, installing, retrieving models, setting up the Streamlit application, usage, customization, and troubleshooting.

Features

The main feature of this project is the Streamlit-based web application, which allows users to load, select and run different versions of trained machine learning models. The application also includes a comprehensive testing framework, logging and error handling mechanisms to ensure a smooth and robust user experience. Each module can be easily customized to accommodate specific requirements or preferences using config.yaml. The entire application and its unit tests can be run inside a docker container. The application has also been deployed on AWS ECS, but has been stopped mainly for cost reasons.

Requirements

  • Python 3.7 or higher
  • Streamlit
  • Docker
  • AWS credentials
  • See requirements.txt.
  • The application assumes that an S3 bucket with trained model objects and training data has already been setup. It will not set one up for you.

Installation

1. Clone the repository

git clone https://github.com/MSIA/423-2023-hw3-hwl6390.git

2. Change directory into repository folder

cd 423-2023-hw3-hwl6390

3. Setup AWS credentials for artifact download from S3

This guide assumes you have installed the AWS CLI. If you have not configured an AWS profile, run the following.

aws configure sso --profile my-sso

For the purposes of this guide, the name of the AWS profile will be my-sso. The user can name it however they like.

After configuring the sso, run the following to login.

aws sso login --profile my-sso

After logging in, export the profile as an environment variable.

export AWS_PROFILE=my-sso

If you run aws configure list and are able to see my-sso in the list of profiles, the environment variable has been set correctly.

4. Install required packages (required for local implementation)

pip install -r requirements.txt

Usage

1. Local

Application only

Verify you are in the same directory as main.py. Then, run

streamlit run main.py

in the terminal.

Unit Test

Run

pytest

in the terminal.

2. Docker

Application only

Build the Docker image
docker build -t clouds-app -f dockerfiles/docker-main .
Run the application
docker run -p 80:80 -v ~/.aws:/root/.aws -e AWS_PROFILE=my-sso clouds-app

Unit Test

Build the Docker image for unit test
docker build -t unittest-cloud -f dockerfiles/docker-test .
Run the tests
docker run unittest-cloud

Customization

To customize settings within the pipeline, edit config.yaml.

AWS

Modify aws section of config.yaml to achieve desired bucket name and prefixes.

clouds-app's People

Contributors

henryliang-123 avatar

Watchers

 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.