Skip to content

Commit

Permalink
added server and worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mindhash committed Apr 9, 2020
1 parent eae8860 commit 2a2ce2e
Show file tree
Hide file tree
Showing 265 changed files with 69,349 additions and 4 deletions.
Binary file added .DS_Store
Binary file not shown.
235 changes: 231 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,231 @@
pkg/*
.DS_Store
bin/*
hyperflow/vendor/*
# go
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/

# node

logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.bash*
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "hflow start",
"type": "shell",
"options": {"cwd": "/Users/apple/MyProjects/go_workspace/src/github.com/hyper-ml/hyperml/server/cmd/hflserver"},
"command": "go run *"
},
{
"label": "minikube start",
"type": "shell",
"command": "minikube start --logtostderr --v=3 --vm-driver=hyperkit"
},
{
"label": "minikube delete",
"type": "shell",
"command": "minikube delete"
},
{
"label": "minikube ingress",
"type": "shell",
"command": "minikube addons enable ingress"
}
]
}
60 changes: 60 additions & 0 deletions devnotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
start Minikube on mac:
minikube start --logtostderr --v=3 --vm-driver=hyperkit

-- enable ingress --
minikube addons enable ingress



-- CURL --

Signup
curl --data '{"username":"mindhash", "password":"saveme123"}' -X POST http://localhost:8888/signup

Login
curl --data '{"username":"mindhash", "password":"saveme123"}' -X POST http://localhost:8888/login


Add ResourceProfile
curl --data '{"Name" : "CPU2", "CPU": 2}' -X POST http://localhost:8888/resources/profiles

curl --data '{"Name" : "V100.C8.M64", "GPU": 1, "GPURam": 34359720775, "CPU": 8, "RAM": 68719441551, "Subtitle": "GPU enabled Plan", "ShortDesc": "This resource plan supports V100 GPU (32GB), 8 CPUs and 64GB DDRM Memory."}' -X POST http://localhost:8888/resources/profiles
curl --data '{"Name" : "V100.C4.M16", "GPU": 1, "GPURam": 34359720775, "CPU": 4, "RAM": 17179860387, "Subtitle": "GPU enabled Plan", "ShortDesc": "This resource plan supports V100 GPU (32GB), 4 CPUs and 16GB DDRM Memory."}' -X POST http://localhost:8888/resources/profiles
curl --data '{"Name" : "C16.M128", "GPU": 1, "GPURam": 34359720775, "CPU": 16, "RAM": 137438883103, "Subtitle": "CPU compute Plan", "ShortDesc": "This resource plan supports 16 CPUs and 128GB DDRM Memory."}' -X POST http://localhost:8888/resources/profiles

curl --data '{"Name" : "Unlimited", "GPU": "", "GPURam": "", "CPU": "", "RAM": "", "Subtitle": "Unlimited Resource Plan", "ShortDesc": "This resource plan expands resources as per demand."}' -X POST http://localhost:8888/resources/profiles


List ResourceProfile
curl -X GET http://localhost:8888/resources/profiles

Add Container Image
curl --data '{"Name": "jupyter/minimal-notebook", "DescText":"Jupyter Minimal Notebook"}' -X POST http://localhost:8888/resources/containerimages

List Container Images
curl -X GET http://localhost:8888/resources/containerimages




Add Notebook

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Ik5hbWUiOiJtaW5kaGFzaCJ9LCJpc3MiOiJoeXBlcmZsb3cifQ.EHXonVm1diWWEaL8oV8iHBHYLghukdl4sBsBL97Qnm8' --data '{"ResourceProfileID": 6, "ContainerImageID":6}' -X POST http://localhost:8888/user/notebooks/new

List notebooks:
curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Ik5hbWUiOiJtaW5kaGFzaCJ9LCJpc3MiOiJoeXBlcmZsb3cifQ.EHXonVm1diWWEaL8oV8iHBHYLghukdl4sBsBL97Qnm8' -X GET http://localhost:8888/user/notebooks

-- Req --
Define Project And Enforce Quota
Assign user to Project


URLS:
http://hyperml.com/J-uyXFPGJainQGIKS5ptkQ==/lab?token=

http://hyperml.com/J-uyXFPGJainQGIKS5ptkQ==/tree?token=

-- Run Background Notebook

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7Ik5hbWUiOiJtaW5kaGFzaCJ9LCJpc3MiOiJoeXBlcmZsb3cifQ.EHXonVm1diWWEaL8oV8iHBHYLghukdl4sBsBL97Qnm8' --data '{"ResourceProfileID": 7, "ContainerImageID":3}' -X POST http://localhost:8888/user/notebooks/bck/new

Binary file added docker/.DS_Store
Binary file not shown.
53 changes: 53 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module github.com/hyper-ml/hyperml

go 1.13

require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
cloud.google.com/go v0.30.0
github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7 // indirect
github.com/aws/aws-sdk-go v1.15.52
github.com/dgraph-io/badger v1.5.4
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f // indirect
github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect
github.com/go-ini/ini v1.38.3 // indirect
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 // indirect
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 // indirect
github.com/google/martian v2.1.0+incompatible // indirect
github.com/googleapis/gax-go v2.0.0+incompatible // indirect
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/mux v1.6.2
github.com/gorilla/websocket v1.4.0
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3 // indirect
github.com/lib/pq v1.0.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/rs/cors v1.7.0
github.com/satori/go.uuid v1.2.0
github.com/sirupsen/logrus v1.2.0
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/spf13/cobra v0.0.7
go.opencensus.io v0.17.0 // indirect
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/net v0.0.0-20190522155817-f3200d17e092
golang.org/x/oauth2 v0.0.0-20181003184128-c57b0facaced
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0 // indirect
google.golang.org/api v0.0.0-20181010000435-ce4acf611b39
google.golang.org/appengine v1.2.0 // indirect
google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f // indirect
gopkg.in/inf.v0 v0.9.0 // indirect
gopkg.in/ini.v1 v1.55.0 // indirect
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76
k8s.io/apimachinery v0.0.0-20180913025736-6dd46049f395
k8s.io/client-go v9.0.0+incompatible
)
Loading

0 comments on commit 2a2ce2e

Please sign in to comment.