Skip to content

Commit

Permalink
ID 5bshce3qiky00p0: Add 3 deployments to Machine Learning (akash-netw…
Browse files Browse the repository at this point in the history
…ork#374)

Co-authored-by: Wilson <[email protected]>
  • Loading branch information
andy108369 and wlouie1 authored Apr 8, 2023
1 parent 709223a commit e1448cf
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Also, follow [@akashnet\_](https://twitter.com/akashnet_) to stay in the loop wi

- [Mattermost](mattermost)

### Machine Learning

- [Jupyter Notebook with Python Kernel](tensorflow-jupyter-mnist)
- [TensorFlow Serving MNIST CNN Model](tensorflow-serving-mnist)
- [Handwritten Digits Recognition Application](tensorflow-webapp-mnist)

### Continuous Integration

- [Jenkins](jenkins)
Expand Down
5 changes: 5 additions & 0 deletions tensorflow-jupyter-mnist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Jupyter Notebook with Python Kernel

The `deploy.yaml` deploys a Jupyter environment with Python kernel, which is a popular environment for data scientists today. The deployment comes with TensorFlow and a notebook for training a convolutional neural network on the MNIST dataset for handwritten digits recognition.

For more information, see the [GitHub repo](https://github.com/wlouie1/mnist-app), and this guide titled [Machine Learning on Akash DeCloud (Part 1/3): Training CNN on MNIST using TensorFlow](https://wilsonlouie.medium.com/machine-learning-on-akash-decloud-part-1-3-training-cnn-on-mnist-using-tensorflow-be464f0f067e).
42 changes: 42 additions & 0 deletions tensorflow-jupyter-mnist/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
version: "2.0"

services:
web:
image: wlouie1/mnist-train:1.0
expose:
- port: 8888
as: 80
to:
- global: true
- port: 6006
as: 6006
to:
- global: true

profiles:
compute:
web:
resources:
cpu:
units: 0.5
memory:
size: 1Gi
storage:
size: 3Gi
placement:
westcoast:
signedBy:
anyOf:
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
- "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"
pricing:
web:
denom: uakt
amount: 10000

deployment:
web:
westcoast:
profile: web
count: 1
5 changes: 5 additions & 0 deletions tensorflow-serving-mnist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# TensorFlow Serving MNIST CNN Model

The `deploy.yaml` deploys a REST endpoint for a MNIST CNN model inference, using [TensorFlow Serving](https://www.tensorflow.org/tfx/serving/docker).

For more information, see the [GitHub repo](https://github.com/wlouie1/mnist-app), and this guide titled [Machine Learning on Akash DeCloud (Part 2/3): TensorFlow Model Serving](https://wilsonlouie.medium.com/machine-learning-on-akash-decloud-part-2-3-tensorflow-model-serving-12e30d77a156).
38 changes: 38 additions & 0 deletions tensorflow-serving-mnist/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
version: "2.0"

services:
web:
image: wlouie1/mnist-tf-serve:1.0
expose:
- port: 8501
as: 80
to:
- global: true

profiles:
compute:
web:
resources:
cpu:
units: 0.2
memory:
size: 512Mi
storage:
size: 512Mi
placement:
westcoast:
signedBy:
anyOf:
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
- "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"
pricing:
web:
denom: uakt
amount: 10000

deployment:
web:
westcoast:
profile: web
count: 1
5 changes: 5 additions & 0 deletions tensorflow-webapp-mnist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Handwritten Digits Recognition Application

The `deploy.yaml` deploys a handwritten digits recognition application built with React, and powered by a TensorFlow model trained on the MNIST dataset.

For more information, see the [GitHub repo](https://github.com/wlouie1/mnist-app), and this guide titled [Machine Learning on Akash DeCloud (Part 3/3): Deploying a Deep Learning Web Application](https://wilsonlouie.medium.com/machine-learning-on-akash-decloud-part-3-3-deploying-a-deep-learning-web-application-6a9e71e71dd1).
80 changes: 80 additions & 0 deletions tensorflow-webapp-mnist/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
version: "2.0"

services:
tfserver:
image: wlouie1/mnist-tf-serve:1.0
expose:
- port: 8501
flaskserver:
image: wlouie1/mnist-flask-serve:1.0
expose:
- port: 5000
depends-on:
- tfserver
web:
image: wlouie1/mnist-app:1.0
expose:
- port: 80
as: 80
to:
- global: true
depends-on:
- flaskserver

profiles:
compute:
tfserver:
resources:
cpu:
units: 0.2
memory:
size: 512Mi
storage:
size: 512Mi
flaskserver:
resources:
cpu:
units: 0.2
memory:
size: 256Mi
storage:
size: 1Gi
web:
resources:
cpu:
units: 0.1
memory:
size: 256Mi
storage:
size: 512Mi
placement:
westcoast:
signedBy:
anyOf:
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
- "akash18qa2a2ltfyvkyj0ggj3hkvuj6twzyumuaru9s4"
pricing:
tfserver:
denom: uakt
amount: 10000
flaskserver:
denom: uakt
amount: 10000
web:
denom: uakt
amount: 10000

deployment:
tfserver:
westcoast:
profile: tfserver
count: 1
flaskserver:
westcoast:
profile: flaskserver
count: 1
web:
westcoast:
profile: web
count: 1

0 comments on commit e1448cf

Please sign in to comment.