diff --git a/FaaS/OpenFaaS/template/README.md b/FaaS/OpenFaaS/template/README.md index 91628d6..eac20d2 100644 --- a/FaaS/OpenFaaS/template/README.md +++ b/FaaS/OpenFaaS/template/README.md @@ -2,11 +2,13 @@ ## What are these templates -> These templates are all based on the Clear Linux* OS. +> Using OpenFaaS template, you can create new functions in a given programming language quickly. +> Here, these templates are all based on the Clear Linux* OS. > They are from the published container images per the function as below. * [clearlinux:base](https://hub.docker.com/_/clearlinux) * [clearlinux/python](https://hub.docker.com/r/clearlinux/python) +* [clearlinux/numpy-mp](https://hub.docker.com/r/clearlinux/numpy-mp) * [clearlinux/golang](https://hub.docker.com/r/clearlinux/golang) * [clearlinux/node](https://hub.docker.com/r/clearlinux/node) diff --git a/FaaS/OpenFaaS/template/dockerfile-clearlinux/README.md b/FaaS/OpenFaaS/template/dockerfile-clearlinux/README.md index 09c8148..21d54fb 100644 --- a/FaaS/OpenFaaS/template/dockerfile-clearlinux/README.md +++ b/FaaS/OpenFaaS/template/dockerfile-clearlinux/README.md @@ -1,7 +1,10 @@ -Based on clearlinux:base image +This is following part of [OpenFaaS tempalte Readme](https://github.com/clearlinux/dockerfiles/blob/master/FaaS/OpenFaaS/template/README.md). +This template is based on [clearlinux:base](https://hub.docker.com/_/clearlinux) image. ### dockerfile-clearlinux -1. `faas-cli new --lang dockerfile-clearlinux hello-openfaas --prefix=""` +1. Create a function named hello-openfass + +`faas-cli new --lang dockerfile-clearlinux hello-openfaas --prefix=""` Files tree as below. > @@ -17,7 +20,9 @@ Based on clearlinux:base image `echo "openblas" >> hello-openfaas/bundles.txt` `echo "wget" >> hello-openfaas/bundles.txt` -2. `faas-cli up -f hello-openfaas.yml` +2. Deploy function - Then you can invoke your python function by OpenFaas UI or faas-cli. +`faas-cli up -f hello-openfaas.yml` + + Then you can invoke your function by OpenFaas UI or faas-cli. diff --git a/FaaS/OpenFaaS/template/go-clearlinux/README.md b/FaaS/OpenFaaS/template/go-clearlinux/README.md index 2059735..e18c964 100644 --- a/FaaS/OpenFaaS/template/go-clearlinux/README.md +++ b/FaaS/OpenFaaS/template/go-clearlinux/README.md @@ -1,7 +1,10 @@ -Based on clearlinux/golang container image +This is following part of [OpenFaaS tempalte Readme](https://github.com/clearlinux/dockerfiles/blob/master/FaaS/OpenFaaS/template/README.md). +This template is based on [clearlinux/golang](https://hub.docker.com/r/clearlinux/golang) container image. ### go-clearlinux -1. `faas-cli new --lang go-clearlinux go-openfaas --prefix=""` +1. Create a function named go-openfass + +`faas-cli new --lang go-clearlinux go-openfaas --prefix=""` Files tree as below. > @@ -17,6 +20,9 @@ Based on clearlinux/golang container image `echo "openblas" >> go-openfaas/bundles.txt` `echo "wget" >> go-openfaas/bundles.txt` -2. `faas-cli up -f go-openfaas.yml` + +2. Deploy function + +`faas-cli up -f go-openfaas.yml` Then you can invoke your go function by OpenFaas UI or faas-cli. diff --git a/FaaS/OpenFaaS/template/node-clearlinux/README.md b/FaaS/OpenFaaS/template/node-clearlinux/README.md index c73bb10..c8e3b7d 100644 --- a/FaaS/OpenFaaS/template/node-clearlinux/README.md +++ b/FaaS/OpenFaaS/template/node-clearlinux/README.md @@ -1,7 +1,10 @@ -Based on clearlinux/node:12 container image. +This is following part of [OpenFaaS tempalte Readme](https://github.com/clearlinux/dockerfiles/blob/master/FaaS/OpenFaaS/template/README.md). +This template is based on [clearlinux/node:12](https://hub.docker.com/r/clearlinux/node) container image. ### node-clearlinux -1. `faas-cli new --lang node-clearlinux node-openfaas --prefix=""` +1. Create a function named node-openfass + +`faas-cli new --lang node-clearlinux node-openfaas --prefix=""` Files tree as below. > @@ -12,7 +15,6 @@ Based on clearlinux/node:12 container image. ├── node-openfaas.yml └── template - * The entry is "handler.js", do any change you want in this file. * Put the required Clear Linux bundles in the "bundles.txt". @@ -21,8 +23,9 @@ Based on clearlinux/node:12 container image. `echo "openblas" >> node-openfaas/bundles.txt` `echo "wget" >> node-openfaas/bundles.txt` +2. Deploy function -2. `faas-cli up -f node-openfaas.yml` +`faas-cli up -f node-openfaas.yml` - Then you can invoke your python function by OpenFaas UI or faas-cli. + Then you can invoke your node function by OpenFaas UI or faas-cli. diff --git a/FaaS/OpenFaaS/template/numpy-mp/README.md b/FaaS/OpenFaaS/template/numpy-mp/README.md index 5a89cde..1834452 100644 --- a/FaaS/OpenFaaS/template/numpy-mp/README.md +++ b/FaaS/OpenFaaS/template/numpy-mp/README.md @@ -1,10 +1,11 @@ -Based on clearlinux/python:3 container image. -Current version is 3.8. -It can set OMP_NUM_THREADS dynamically at runtime to accelerate -performance according to assigned computing resources. +This is following part of [OpenFaaS tempalte Readme](https://github.com/clearlinux/dockerfiles/blob/master/FaaS/OpenFaaS/template/README.md). +This template is based on [clearlinux/numpy-mp](https://hub.docker.com/r/clearlinux/numpy-mp) container image. Python version is 3.8. +It can leverage AVX512 advantage and set OMP_NUM_THREADS dynamically at runtime to accelerate performance according to assigned computing resources. ### numpy-clearlinux -1. `faas-cli new --lang numpy-mp numpy-openfaas --prefix=""` +1. Create a function named numpy-openfass + +`faas-cli new --lang numpy-mp numpy-openfaas --prefix=""` Files tree as below. > @@ -35,6 +36,8 @@ performance according to assigned computing resources. * Entry is "handler.py", do any change you want here. -2. `faas-cli up -f numpy-openfaas.yml` +2. Deploy function + +`faas-cli up -f numpy-openfaas.yml` Then you can invoke your python function by OpenFaas UI or faas-cli. diff --git a/FaaS/OpenFaaS/template/python3-clearlinux/README.md b/FaaS/OpenFaaS/template/python3-clearlinux/README.md index 2e6fce9..7d79517 100644 --- a/FaaS/OpenFaaS/template/python3-clearlinux/README.md +++ b/FaaS/OpenFaaS/template/python3-clearlinux/README.md @@ -1,8 +1,10 @@ -Based on clearlinux/python:3 container image. -Current version is 3.8. +This is following part of [OpenFaaS tempalte Readme](https://github.com/clearlinux/dockerfiles/blob/master/FaaS/OpenFaaS/template/README.md). +This template is based on [clearlinux/python:3](https://hub.docker.com/r/clearlinux/python) container image. Python version is 3.8. ### python3-clearlinux -1. `faas-cli new --lang python3-clearlinux hello-openfaas --prefix=""` +1. Create a function named hello-openfass + +`faas-cli new --lang python3-clearlinux hello-openfaas --prefix=""` Files tree as below. > @@ -29,6 +31,8 @@ Current version is 3.8. * Put any initial/helper operation in the "help_script.sh" -2. `faas-cli up -f hello-openfaas.yml` +2. Deploy function + +`faas-cli up -f hello-openfaas.yml` Then you can invoke your python function by OpenFaas UI or faas-cli.