Commit 9b7da74b authored by Daniele Venzano's avatar Daniele Venzano

Update versions and add GPU zapp

parent cd39d707
......@@ -5,7 +5,7 @@ stages:
- deploy
variables:
VERSION: 8117
VERSION: 10366
REPOSITORY: zapps
before_script:
......@@ -16,6 +16,7 @@ test:build:
stage: test
script:
- docker build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/pydatasci:${VERSION} pydatasci/
- docker build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/pydatasci-gpu:${VERSION} pydatasci-gpu/
test:json:
image: python:3-alpine
......@@ -25,116 +26,17 @@ test:json:
script:
- python gen_json.py
- python /scripts/validate.py ${ZOE_VALIDATION_URL} pydatasci.json
- python /scripts/validate.py ${ZOE_VALIDATION_URL} pydatasci-gpu.json
artifacts:
paths:
- pydatasci.json
.build_template: &build_def
stage: build
script:
- docker -H ${BUILD_HOST}.containers.bigfoot.eurecom.fr:2375 $DOCKER_TLS_OPTIONS build --build-arg VERSION=${VERSION} -t ${REPOSITORY}/pydatasci:${VERSION} pydatasci/
only:
- master
- pydatasci-gpu.json
push:hub:
stage: push
script:
- docker push ${REPOSITORY}/pydatasci:${VERSION}
- docker push ${REPOSITORY}/pydatasci-gpu:${VERSION}
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
build:bf7:
<<: *build_def
variables:
BUILD_HOST: bf7
build:bf8:
<<: *build_def
variables:
BUILD_HOST: bf8
build:bf9:
<<: *build_def
variables:
BUILD_HOST: bf9
build:bf10:
<<: *build_def
variables:
BUILD_HOST: bf10
build:bf12:
<<: *build_def
variables:
BUILD_HOST: bf12
build:bf13:
<<: *build_def
variables:
BUILD_HOST: bf13
build:bf14:
<<: *build_def
variables:
BUILD_HOST: bf14
build:bf15:
<<: *build_def
variables:
BUILD_HOST: bf15
build:bf16:
<<: *build_def
variables:
BUILD_HOST: bf16
build:bf17:
<<: *build_def
variables:
BUILD_HOST: bf17
build:bf18:
<<: *build_def
variables:
BUILD_HOST: bf18
build:bf19:
<<: *build_def
variables:
BUILD_HOST: bf19
build:bf20:
<<: *build_def
variables:
BUILD_HOST: bf20
build:bf21:
<<: *build_def
variables:
BUILD_HOST: bf21
build:bf22:
<<: *build_def
variables:
BUILD_HOST: bf22
build:deepfoot1:
<<: *build_def
variables:
BUILD_HOST: deepfoot1
# Notebook for Data Science
This ZApp contains a Jupyter Notebook with a Python 3.6 kernel and the following libraries:
This ZApp contains a Jupyter Notebook with a Python 3.5 kernel and the following libraries:
* Tensorflow 1.8.0
* Pytorch and TorchVision 0.4.0
* Tensorflow 1.10.1, Tensorboard 1.10.0
* Pytorch and TorchVision 0.4.1
* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh
The GPU version contains also CUDA 9.0 and tensorflow with GPU support
# Copyright (c) 2016, Daniele Venzano
#!/usr/bin/python
# Copyright (c) 2018, Daniele Venzano
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -37,15 +38,16 @@ REPOSITORY = os.getenv("REPOSITORY", default="zapps")
VERSION = os.getenv("VERSION", default="latest")
IMAGE = REPOSITORY + '/pydatasci:' + VERSION
IMAGE_GPU = REPOSITORY + '/pydatasci-gpu:' + VERSION
def nb_service(memory_limit, core_limit):
def nb_service(memory_limit, core_limit, image):
"""
:rtype: dict
"""
mem_limit_mb = memory_limit / (1024**2)
service = {
'name': "py-notebook",
'image': IMAGE,
'image': image,
'monitor': True,
'resources': {
"memory": {
......@@ -84,11 +86,23 @@ if __name__ == '__main__':
'will_end': False,
'size': 512,
'services': [
nb_service(options["memory_limit"]["value"], options["core_limit"]["value"])
nb_service(options["memory_limit"]["value"], options["core_limit"]["value"], IMAGE)
]
}
json.dump(app, open("pydatasci.json", "w"), sort_keys=True, indent=4)
app = {
'name': APP_NAME + '-gpu',
'version': ZOE_APPLICATION_DESCRIPTION_VERSION,
'will_end': False,
'size': 512,
'services': [
nb_service(options["memory_limit"]["value"], options["core_limit"]["value"], IMAGE_GPU)
]
}
json.dump(app, open("pydatasci-gpu.json", "w"), sort_keys=True, indent=4)
print("ZApp written")
......@@ -8,6 +8,14 @@
"description": "pydatasci.json",
"parameters": [],
"guest_access": true
},
{
"category": "Data science",
"readable_descr": "README-datascience.md",
"name": "Data science notebook GPU",
"description": "pydatasci-gpu.json",
"parameters": [],
"guest_access": false
}
]
}
......
ARG VERSION=test
FROM zapps/python36:${VERSION}
FROM zapps/python:${VERSION}
RUN pip install --upgrade pip \
notebook \
jupyterlab \
tensorflow==1.8.0 \
tensorflow==1.10.1 \
tensorboard==1.10.0 \
pandas \
matplotlib \
scipy \
......@@ -19,6 +20,6 @@ RUN pip install --upgrade pip \
dill \
numba \
bokeh \
torch==0.4.0 \
torch==0.4.1 \
torchvision
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