Commit 81fb19cb authored by Daniele Venzano's avatar Daniele Venzano

Add Tensorflow with GPU ZApp

parent 35829d61
......@@ -18,9 +18,10 @@ import sys
import os
APPS = [
('tf-google', "gcr.io/tensorflow/tensorflow:1.3.0-py3"),
('stnet-google', "tensorflow/syntaxnet"),
('mag-google', "tensorflow/magenta")
('tf-google', "gcr.io/tensorflow/tensorflow:1.3.0-py3", False),
('stnet-google', "tensorflow/syntaxnet", False),
('mag-google', "tensorflow/magenta", False),
('tf-google-gpu', "gcr.io/tensorflow/tensorflow:1.3.0-gpu-py3", True)
]
ZOE_APPLICATION_DESCRIPTION_VERSION = 3
......@@ -31,7 +32,7 @@ options = {
'description': 'Core limit'
},
'memory_limit': {
'value': 4 * (1024**3),
'value': 32 * (1024**3),
'description': 'Memory limit (bytes)'
}
}
......@@ -40,7 +41,7 @@ REGISTRY = os.getenv("DOCKER_REGISTRY", default="docker-engine:5000")
REPOSITORY = os.getenv("REPOSITORY", default="zapps")
VERSION = os.getenv("VERSION", default="latest")
def goog_tensorflow_service(memory_limit, core_limit, image):
def goog_tensorflow_service(memory_limit, core_limit, image, gpu=False):
"""
:rtype: dict
"""
......@@ -80,19 +81,21 @@ def goog_tensorflow_service(memory_limit, core_limit, image):
'startup_order': 0,
'replicas': 1
}
if gpu:
service['labels'] = ['gpu']
return service
if __name__ == '__main__':
for app_name, image in APPS:
for app_name, image, gpu 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)
goog_tensorflow_service(options["memory_limit"]["value"], options["core_limit"]["value"], image, gpu)
]
}
......
......@@ -8,6 +8,13 @@
"readable_descr": "README-goog.md",
"parameters": []
},
{
"category": "TensorFlow",
"name": "Google TensorFlow notebook with GPU",
"description": "tf-google-gpu.json",
"readable_descr": "README-goog.md",
"parameters": []
},
{
"category": "TensorFlow",
"name": "Google TensorFlow batch",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment