Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions tasks/task-build/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 8
},
"root": true,
"env": {
"node": true,
"es6": true
"node": true
},
"globals": {
"Map": true,
"Promise": true,
"Uint8Array": true,
"BigInt": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 13
},
"plugins": [ "node" ],
"rules": {
Expand Down Expand Up @@ -35,10 +42,8 @@
"keyword-spacing": [ "error", { "before": true, "after": true } ],
"template-curly-spacing": [ "error", "never" ],
"semi-spacing": "error",
"strict": "error",
"node/no-unsupported-features": [ "error", { "version": 8 } ],
"node/no-missing-require": "error",
"valid-jsdoc": ["warn", {
"valid-jsdoc": ["error", {
"requireParamDescription": false,
"requireReturnDescription": false,
"requireReturnType": false,
Expand Down
2 changes: 1 addition & 1 deletion tasks/task-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apk -v --update add \
mailcap \
&& python3 -m ensurepip \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic
&& pip3 install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic tensorflow==2.7.0

WORKDIR /usr/local/src/batch
ADD . /usr/local/src/batch
Expand Down
8 changes: 8 additions & 0 deletions tasks/task-build/lib/convert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
""" convert an H5 Model to .PB"""
import tensorflow as tf
import sys

args = sys.argv[1:]

pre_model = tf.keras.models.load_model(args[0])
pre_model.save(args[1])
8 changes: 3 additions & 5 deletions tasks/task-build/lib/ptserving.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict';

const CP = require('child_process');
const path = require('path');
const fs = require('fs');
import CP from 'child_process';

async function docker(tmp, model, tagged_model) {
async function docker(tmp) {
console.error('ok - pulling tensorflow/serving docker image');

CP.execSync(`
Expand Down Expand Up @@ -45,4 +43,4 @@ async function docker(tmp, model, tagged_model) {
return tag;
}

module.exports = docker;
export default docker;
8 changes: 3 additions & 5 deletions tasks/task-build/lib/tfserving.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict';

const CP = require('child_process');
const path = require('path');
const fs = require('fs');
import CP from 'child_process';

function docker(tmp, model, tagged_model) {
function docker(tmp) {
console.error('ok - pulling tensorflow/serving docker image');

CP.execSync(`
Expand Down Expand Up @@ -45,4 +43,4 @@ function docker(tmp, model, tagged_model) {
return tag;
}

module.exports = docker;
export default docker;
Loading