Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
zapp-tensorflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zoe-apps
zapp-tensorflow
Commits
7c7c67c0
Commit
7c7c67c0
authored
Sep 13, 2017
by
Daniele Venzano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SyntaxNet and Magenta ZApps
parent
78d083f1
Pipeline
#4507
failed with stages
in 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
52 deletions
+81
-52
.gitlab-ci.yml
.gitlab-ci.yml
+38
-27
README-goog.md
README-goog.md
+2
-2
gen_json_google.py
gen_json_google.py
+20
-16
manifest.json
manifest.json
+21
-7
No files found.
.gitlab-ci.yml
View file @
7c7c67c0
stages
:
-
build
-
test
-
pull
-
deploy
variables
:
VERSION
:
$CI_
BUILD
_ID
VERSION
:
$CI_
PIPELINE
_ID
#standalone:
# image: docker:latest
# stage: deploy
# before_script:
# - mkdir -p /etc/docker/certs.d/$DOCKER_REGISTRY
# - cp /registry-ca.crt /etc/docker/certs.d/$DOCKER_REGISTRY/ca.crt
# - mkdir -p $HOME/.docker
# - echo $DOCKER_AUTH_CONFIG > $HOME/.docker/config.json
# - apk update
# - apk add python findutils bash curl
# script:
# - bash build_all.sh
# - python gen_json_standalone.py
# - bash validate_all.sh
# artifacts:
# paths:
# - "*.json"
# only:
# - master
build:json:
image
:
python:3-alpine
stage
:
build
script
:
-
python gen_json_google.py
artifacts
:
paths
:
-
"
*.json"
google
:
image
:
python:alpine
stage
:
deploy
test:json
:
image
:
python:
3-
alpine
stage
:
test
before_script
:
-
apk update
-
apk add bash curl
-
pip install requests
script
:
-
python gen_json_google.py
-
bash validate_all.sh
-
python validate.py ${ZOE_VALIDATION_URL} *google.json
pull:all:
stage
:
pull
script
:
-
docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull tensorflow/magenta
-
docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull gcr.io/tensorflow/tensorflow:1.3.0-py3
-
docker -H ${SWARM} ${SWARM_TLS_OPTIONS} pull tensorflow/syntaxnet
only
:
-
master
deploy:json:
stage
:
deploy
script
:
-
mkdir -p ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}
-
cp *.json ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
-
cp logo.png ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
-
cp README*.md ${ZAPP_SHOP_BASE_PATH}/${CI_PROJECT_NAME}/
artifacts
:
paths
:
-
"
*.json"
-
logo.png
-
"
README*.md"
only
:
-
master
README-goog.md
View file @
7c7c67c0
# Tensorflow ZApp
Unmodified
[
Google TensorFlow
](
https://www.tensorflow.org/
)
as generated by Google.
This ZApp contains a Jupyter Notebook.
Unmodified
[
Google TensorFlow
](
https://www.tensorflow.org/
)
as generated by Google.
The image used contains TensorFlow 1.3 for Python 3.
The image used contains TensorFlow 1.3 for Python 3
and a Jupyter Notebook
.
gen_json_google.py
View file @
7c7c67c0
...
...
@@ -17,7 +17,12 @@ import json
import
sys
import
os
APP_NAME
=
'tf-google'
APPS
=
[
(
'tf-google'
,
"gcr.io/tensorflow/tensorflow:1.3.0-py3"
),
(
'stnet-google'
,
"tensorflow/syntaxnet"
),
(
'mag-google'
,
"tensorflow/magenta"
)
]
ZOE_APPLICATION_DESCRIPTION_VERSION
=
3
options
=
{
...
...
@@ -35,15 +40,13 @@ REGISTRY = os.getenv("DOCKER_REGISTRY", default="docker-engine:5000")
REPOSITORY
=
os
.
getenv
(
"REPOSITORY"
,
default
=
"zapps"
)
VERSION
=
os
.
getenv
(
"VERSION"
,
default
=
"latest"
)
GOOG_IMAGE
=
"gcr.io/tensorflow/tensorflow:1.3.0-py3"
def
goog_tensorflow_service
(
memory_limit
,
core_limit
):
def
goog_tensorflow_service
(
memory_limit
,
core_limit
,
image
):
"""
:rtype: dict
"""
service
=
{
'name'
:
"tf-jupyter"
,
'image'
:
GOOG_IMAGE
,
'image'
:
image
,
'monitor'
:
True
,
'resources'
:
{
"memory"
:
{
...
...
@@ -82,17 +85,18 @@ def goog_tensorflow_service(memory_limit, core_limit):
if
__name__
==
'__main__'
:
app
=
{
'name'
:
APP_NAME
,
'version'
:
ZOE_APPLICATION_DESCRIPTION_VERSION
,
'will_end'
:
False
,
'size'
:
512
,
'services'
:
[
goog_tensorflow_service
(
options
[
"memory_limit"
][
"value"
],
options
[
"core_limit"
][
"value"
])
]
}
for
app_name
,
image
in
APPS
:
app
=
{
'name'
:
app_name
,
'version'
:
ZOE_APPLICATION_DESCRIPTION_VERSION
,
'will_end'
:
False
,
'size'
:
512
,
'services'
:
[
goog_tensorflow_service
(
options
[
"memory_limit"
][
"value"
],
options
[
"core_limit"
][
"value"
],
image
)
]
}
json
.
dump
(
app
,
open
(
"goog_tensorflow
.json"
,
"w"
),
sort_keys
=
True
,
indent
=
4
)
json
.
dump
(
app
,
open
(
app_name
+
"
.json"
,
"w"
),
sort_keys
=
True
,
indent
=
4
)
print
(
"ZApp written"
)
print
(
"ZApp
s
written"
)
manifest.json
View file @
7c7c67c0
...
...
@@ -2,17 +2,17 @@
"version"
:
1
,
"zapps"
:
[
{
"category"
:
"
Jupyter notebooks
"
,
"name"
:
"TensorFlow notebook"
,
"description"
:
"
goog_tensorflow
.json"
,
"category"
:
"
TensorFlow
"
,
"name"
:
"
Google
TensorFlow notebook"
,
"description"
:
"
tf-google
.json"
,
"readable_descr"
:
"README-goog.md"
,
"parameters"
:
[]
},
{
"category"
:
"
Non-interactive
"
,
"name"
:
"
Batch TensorFlow
"
,
"description"
:
"
goog_tensorflow
.json"
,
"readable_descr"
:
"README-
custom
.md"
,
"category"
:
"
TensorFlow
"
,
"name"
:
"
Google TensorFlow batch
"
,
"description"
:
"
tf-google
.json"
,
"readable_descr"
:
"README-
batch
.md"
,
"parameters"
:
[
{
"kind"
:
"command"
,
...
...
@@ -23,6 +23,20 @@
"default"
:
"./my-tf-app/main.py"
}
]
},
{
"category"
:
"TensorFlow"
,
"name"
:
"DRAGNN SyntaxNet model"
,
"description"
:
"stnet-google.json"
,
"readable_descr"
:
"README-syntaxnet.md"
,
"parameters"
:
[]
},
{
"category"
:
"TensorFlow"
,
"name"
:
"Magenta model"
,
"description"
:
"magenta-google.json"
,
"readable_descr"
:
"README-magenta.md"
,
"parameters"
:
[]
}
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment