Skip to content

Instantly share code, notes, and snippets.

@gosuri
Last active November 10, 2019 23:19
Show Gist options
  • Save gosuri/959515306e5eac3a10cc9dd1108d7854 to your computer and use it in GitHub Desktop.
Save gosuri/959515306e5eac3a10cc9dd1108d7854 to your computer and use it in GitHub Desktop.
Machine Learning Job on Akash

Thanks to Alex Ellis. Convert a B&W picture into color:

wget https://i.etsystatic.com/7867627/r/il/e78b18/1482264837/il_570xN.1482264837_rbr1.jpg
curl -s --data-binary @./il_570xN.1482264837_rbr1.jpg http://6mwebzdfo8k5chwcqkdwz5.roy.akashtest.net > sf.jpg

open sf.jpg

To run your own ML job, here's a sample:

---
version: "1.0"

services:
  colorization:
    image: alexellis2/openfaas-colorization:0.4.1
    cmd:
     - python -u index.py
    expose:
      - port: 8080
        as: 80
        to:
          - global: true

profiles:
  compute:
    colorization:
      cpu: "1.0"
      memory: "1G"
      disk: "1G"

  placement:
    attributes:
      sgx: enabled
    global:
      pricing:
        colorization: 500u

deployment:
  colorization:
    global:
      profile: colorization
      count: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment