Commit 97a96695 authored by Daniele Venzano's avatar Daniele Venzano

Add PyTorch notebook

parent 26440172
stages:
- build
- test
- pull
- push
- deploy
variables:
VERSION: $CI_PIPELINE_ID
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
build:pytorch:
stage: build
script:
- docker build -t ${DOCKER_REGISTRY}/${REPOSITORY}/pytorch:${VERSION} docker/pytorch
build:json:
image: python:3-alpine
stage: build
......@@ -24,6 +35,11 @@ test:json:
script:
- python validate.py ${ZOE_VALIDATION_URL} *notebook.json
push:all:
stage: push
script:
- docker push ${DOCKER_REGISTRY}/${REPOSITORY}/pytorch:${VERSION}
deploy:json:
stage: deploy
script:
......
# Jupyter Notebook with PyTorch
URL: [https://hub.docker.com/r/jupyter/scipy-notebook/](https://hub.docker.com/r/jupyter/scipy-notebook/) and [http://pytorch.org/](http://pytorch.org/)
* Jupyter Notebook 5.0.x
* Conda Python 3.x environment
* pandas, matplotlib, scipy, seaborn, scikit-learn, scikit-image, sympy, cython, patsy, statsmodel, cloudpickle, dill, numba, bokeh, vincent, beautifulsoup, xlrd pre-installed
* PyTorch
Please note that you need to retrieve the secret key from the service logs to be able to access the notebooks.
FROM jupyter/scipy-notebook:latest
MAINTAINER Daniele Venzano <venza@brownhat.org>
RUN conda install pytorch torchvision cuda80 -c soumith
......@@ -19,11 +19,16 @@ import json
import sys
import os
REGISTRY = os.getenv("DOCKER_REGISTRY", default="docker-engine:5000")
REPOSITORY = os.getenv("REPOSITORY", default="zapps")
VERSION = os.getenv("VERSION", default="latest")
UPSTREAM_NOTEBOOKS = [
("r-notebook", "jupyter/r-notebook:latest"),
("datasci-notebook", "jupyter/datascience-notebook:latest"),
("tf-notebook", "jupyter/tensorflow-notebook:latest"),
("scipy-notebook", "jupyter/scipy-notebook:latest")
("scipy-notebook", "jupyter/scipy-notebook:latest"),
("pytorch-notebook", REGISTRY + "/" + REPOSITORY + "/pytorch:" + VERSION)
]
ZOE_APPLICATION_DESCRIPTION_VERSION = 3
......@@ -39,10 +44,6 @@ options = {
}
}
REGISTRY = os.getenv("DOCKER_REGISTRY", default="docker-engine:5000")
REPOSITORY = os.getenv("REPOSITORY", default="zapps")
VERSION = os.getenv("VERSION", default="latest")
def jupyter_service(memory_limit, core_limit, image):
"""
:rtype: dict
......
......@@ -28,6 +28,14 @@
"name": "TensorFlow notebook",
"description": "tf-notebook.json",
"parameters": []
},
{
"category": "Machine learning",
"readable_descr": "README-torch.md",
"name": "PyTorch notebook",
"description": "pytorch-notebook.json",
"parameters": [],
"logo": "pytorch.png"
}
]
}
......
pytorch.png

6.58 KB

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