• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

mlops template

CI Codespaces Prebuilds

Template for MLOPs projects with GPU

CONDA IS NOT NEEDED AS A PACKAGE MANAGER. All setup is done using the Python Software Foundation recommended tools: virtualenv and pip and mainstream production tools Docker. Please see PEP 453 "officially recommend the use of pip as the default installer for Python packages"

GitHub Codespaces are FREE for education and as are GPU Codespaces as of this writing in December 2022

  1. First thing to do on launch is to open a new shell and verify virtualenv is sourced.

Things included are:

  • Makefile

  • Pytest

  • pandas

  • Pylint or ruff

  • Dockerfile

  • GitHub copilot

  • jupyter and ipython

  • Most common Python libraries for ML/DL and Hugging Face

  • githubactions

Two fun tools to explore:

  • Zero-shot classification: ./hugging-face/zero_shot_classification.py classify
  • Yake for candidate label creation: ./utils/kw_extract.py

Try out Bento

docker run -it --rm -p 8888:8888 -p 3000:3000 -p 3001:3001 bentoml/quickstart:latest

Verify GPU works

The following examples test out the GPU (including Docker GPU)

  • run pytorch training test: python utils/quickstart_pytorch.py
  • run pytorch CUDA test: python utils/verify_cuda_pytorch.py
  • run tensorflow training test: python utils/quickstart_tf2.py
  • run nvidia monitoring test: nvidia-smi -l 1 it should show a GPU
  • run whisper transcribe test ./utils/transcribe-whisper.sh and verify GPU is working with nvidia-smi -l 1
  • run lspci | grep -i nvidia you should see something like: 0001:00:00.0 3D controller: NVIDIA Corporation GV100GL [Tesla V100 PCIe 16GB] (rev a1)

Additionally, this workspace is setup to fine-tune Hugging Face

fine-tune

python hugging-face/hf_fine_tune_hello_world.py

Verify containerized GPU works for Tensorflow

Because of potential versioning conflicts between PyTorch and Tensorflow it is recommended to run Tensorflow via GPU Container and PyTorch via default environment.

See TensorFlow GPU documentation

  • Run docker run --gpus all -it --rm tensorflow/tensorflow:latest-gpu \ python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

  • Also interactively explore: docker run --gpus all -it --rm tensorflow/tensorflow:latest-gpu, then when inside run: apt-get update && apt-get install pciutils then lspci | grep -i nvidia

  • To mount the code into your container: docker run --gpus all -it --rm -v $(pwd):/tmp tensorflow/tensorflow:latest-gpu /bin/bash. Then do apt-get install -y git && cd /tmp. Then all you need to do is run make install. Now you can verify you can train deep learning models by doing python utils/quickstart_tf2.py

More Tensorflow GPU Ideas

https://www.tensorflow.org/resources/recommendation-systems

# Deploy the retrieval model with TensorFlow Serving
docker run -t --rm -p 8501:8501 \
  -v "RETRIEVAL/MODEL/PATH:/models/retrieval" \
  -e MODEL_NAME=retrieval tensorflow/serving &

Setup Docker Toolkit NVidia

mlops-tensorflow-gpu

Used in Following Projects

Used as the base and customized in the following Duke MLOps and Applied Data Engineering Coursera Labs:

References

More Repositories

1

rust-mlops-template

A work in progress to build out solutions in Rust for MLOPs
Rust
220
star
2

rust-data-engineering

Code for a Duke Coursera Rust-based data engineering course
Rust
45
star
3

rusty-deploy

MLOps Deploy Solutions with Rust
Makefile
35
star
4

rust-tutorial

tutorial for Rust for Enterprise MLOps book by O'Reilly
Python
26
star
5

rust-candle-demos

Demos using Rust Candle
Dockerfile
21
star
6

rust-pytorch-gpu-template

Rust PyTorch GPU configuration
Rust
21
star
7

assimilate-aws

A deep dive into programmatically mastering AWS
Python
14
star
8

devops-skills-with-GitHub

All of the tools for building devops workflows
Python
12
star
9

pytorch-fastapi-aws-apprunner

Example application of using Pytorch with fastapi and AWS App Runner
Python
12
star
10

rust-with-python

Using Rust with Python
Rust
11
star
11

coursera-applied-de-kubernetes-lab

Labs for Coursera Applied Kubernetes
Python
9
star
12

assimilate-databricks

A repo to assimilate databricks
Jupyter Notebook
9
star
13

Liten

Liten, an open source, fast, and accurate duplicate file finder for Macs
Objective-C
9
star
14

aws-lambda-rust

A repo of demos with AWS Lambda Rust
Rust
9
star
15

hello-rust

this is a rust project
Rust
8
star
16

52-weeks-rust

Trying out Rust
Makefile
8
star
17

hugging-face-cli-with-codespaces

Repo that allows me to build AI tools on top of Hugging Face
Python
7
star
18

heuristics

Copilot assisted algorithms and heuristics
Python
6
star
19

ludwig-getting-started

Declarative ML examples with Ludwig
Makefile
6
star
20

wiki-generative-summarization

Python
6
star
21

hugging-face

Makefile
5
star
22

gcp-cloud-cert-resources

Go
5
star
23

functions-from-zero

A repo to learn functions
Python
5
star
24

BallersDash

The NBA Statistics Dashboard is an innovative and user-focused project that harnesses daily data scraping to create a dynamic platform for sports bettors, NBA enthusiasts, and fantasy league participants.
Python
5
star
25

mastering-functions-2022

This is a repo for mastering Python functions
Jupyter Notebook
4
star
26

Web3-Rust-Chat-App_Scott-Zhanyi

Rust
4
star
27

Shopee-Product-Price-Match-Guarantee

Shopee - Price Match Guarantee: Match products with descriptions and images
Jupyter Notebook
4
star
28

Coursera-MLOPs-Foundations-Lab-1-CICD

Labs for Duke Coursera Course on MLOps Foundations
Dockerfile
4
star
29

sensible

A sensible Python logging configuration
Python
4
star
30

mlops-presentation-11-2022

This is a repo for demonstrating mlops best practices
Python
4
star
31

github-actions-rust-example

Build and test a Rust Project
Rust
3
star
32

3rdeye

Mystical stats for git
R
3
star
33

python-template

Python Template for GitHub Codespaces
Dockerfile
3
star
34

assimilate-pytorch

This is a repo for assimilating pytorch
Python
3
star
35

coursera-applied-data-eng-projects

Project for the Duke Coursera Applied Data Engineering Specialization
Python
3
star
36

pyli

Deduper
Python
3
star
37

hugging-face-tutorials

tutorials on Hugging Face
Jupyter Notebook
3
star
38

github-certifications

Notes on GitHub Certifications
3
star
39

master-python-functions-dec-2022

master python functions 2022
Python
3
star
40

go-template

This is a template for building go language applications
Go
3
star
41

Beibei_Du_IDS721_Projet1

This project aims to do a cloud continuous delivery of Microservices using Rust Language
Jupyter Notebook
3
star
42

copilot-codespace-demo

trying out features of copilot in CodeSpaces
3
star
43

Coursera-MLOPs-Foundations-Lab-2-poker-simulator

Poker Simulator
Python
3
star
44

mlrun-tutorials

mlrun tutorials using code spaces
Jupyter Notebook
3
star
45

Shunian-Chen-CI-CD

Python
2
star
46

IDS706_w11_DatabricksETL_Individual_hzx

Individual Project #3: Databricks ETL (Extract Transform Load) Pipeline
Python
2
star
47

IDS706_Project1_Beibei

This is the repository for IDS706 FA22 Project1
Jupyter Notebook
2
star
48

gcp-ml-cert

Code Examples for the Google ML Certification
Jupyter Notebook
2
star
49

csharp-template

Day 1 of live coding with C# and .NET
C#
2
star
50

containers-and-kubernetes-for-data-ml

A Repository for doing kubernetes work for data and ML
2
star
51

julia-getting-started

playing around with Julia
Julia
2
star
52

Jiaxin-P2-Microservice-Rust

Rust
2
star
53

MBTI-Personality-Test

Jupyter Notebook
2
star
54

IDS706-Zilin

Dockerfile
2
star
55

IDS705_ML_Team9

Jupyter Notebook
2
star
56

IDS706-Final_Project-Group2

Beibei Du
Jupyter Notebook
2
star
57

song4

Data Engineering (Individual Project #4)
Python
2
star
58

assimilate-zig

Assimilate the Zig Language
Makefile
2
star
59

music-reco-rust-cli-with-spotify-api

Rust
2
star
60

rust-sagemaker-mlops

Rust for AWS Sagemaker MLOps
Makefile
2
star
61

nm132-chat-application

Chat application in Rust
Rust
2
star
62

Project-2---NC-Stock-Market-Analysis

Analysis of Stock Market data for project 2.
Jupyter Notebook
2
star
63

SQL_DY

Jupyter Notebook
2
star
64

project2_VioletPang

Python
2
star
65

NLP-CP2077-Sentiment-Analysis

TBA
Jupyter Notebook
2
star
66

data-science-projects

This is a data science projects repo
Jupyter Notebook
2
star
67

project-3-SQL-yayun

This is a repo for Data engineering project 3 related to SQL
Python
2
star
68

p2_Fangting

Shell
2
star
69

assimilate-hugging-face

Assimilate Hugging Face Repository for series
Python
2
star
70

IDS706_Final_Project_klap

Jupyter Notebook
2
star
71

kh495-cli

KH495 IDS721 Spring 2023 Project 1 - Rust CLI Tool
Rust
2
star
72

compile-python

This is a repo for compiling and installing python from scratch
Makefile
2
star
73

DY_Expected_Goal_Referee_project

Jupyter Notebook
2
star
74

Beibei_Du_IDS706_Project2

Jupyter Notebook
2
star
75

IDS706_FinalProject

Jupyter Notebook
2
star
76

IDS706_Fall2023_Final_Team_Project

Jupyter Notebook
2
star
77

Steam_Review__Analyzer

The following is the repository for the Steam Review Analyzer. This is a Docker contained Microservice, that takes user specification, and displays a Dashboard filled with game analysis based off their Steam Reviews.
Jupyter Notebook
2
star
78

nba-cli-tool

This project is a demonstration of a robust Command Line Interface (CLI) tool designed for effortless data handling (ETL) and statistical analysis in NBA sports betting.
Python
2
star
79

assimilate-pygame

A series on Pygame
Python
2
star
80

GenAIHackathon-29

Python
1
star
81

python-ruff-template

Rust-based Ruff Linter
Dockerfile
1
star
82

yifan_proj2

tmp
Python
1
star
83

Final_Group_Project

This is a repository for IDS 706 Final Team Project. Produced by Kelly Tong, Cassie Kang, Katherine Tian.
Python
1
star
84

oreilly-book-enterprise-mlops

A central location to share recipes around MLOps for the O'Reilly book implementing Enterprise MLOps
1
star
85

SA2C-Recommender-System-NC-2

Working on SA2C Recommender System Testing
Python
1
star
86

Final_LG_JL_KM

This is our final project for DE
Python
1
star
87

aws-scripts

Various AWS automation scripts
1
star
88

IDS706_Fall2023_Project_3_Databricks_ETL_Pipeline

Jupyter Notebook
1
star
89

IDS706-Databricks-Mlflow-XS110

Jupyter Notebook
1
star
90

Data_eng_project1-Pragya

Write a Big Data Script that uses the Pandas API for Spark or Dask
Python
1
star
91

IDS706_Cirun_Test

Python
1
star
92

CodeSpaces_Example

Python
1
star
93

DevOps-2023

This is a GitHub Codespaces DevOps tutorial over several hours
Python
1
star
94

Project-2-Elisa-Chen

This is the repo that contains the source code for a CLI tool for data partitioning.
Shell
1
star
95

gitmath

Performs Code Churn Analysis on Git using R
R
1
star
96

song2

Individual Project 2 (Data Engineering Systems)
Shell
1
star
97

nlp_cloud_example

Using cloud resources to run NLP Tasks
Jupyter Notebook
1
star
98

DukeOpenAIHack

Duke OpenAI Hackathon
Jupyter Notebook
1
star
99

CD_FastAPI_AWS_DY

Project 4: Ancient Chinese Poem Line Generator
Python
1
star
100

assimilate-github

Assimilate GitHub
Rust
1
star