arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Installation

The Hydrosphere platform can be installed in the following orchestrator's:

  1. Docker Compose

  2. Kubernetes

hashtag
Docker installation

To install Hydrosphere using docker-compose, you should have the following prerequisites installed on your machine.

hashtag
Install from releases

  1. Download the latest $2.4.3$ release from the :

  1. Unpack the tar ball:

  1. Set up an environment:

hashtag
Install from source

  1. Clone the serving repository:

  2. Set up an environment:

To check the installation, open . By default, Hydrosphere UI is available at port 80.

hashtag
Kubernetes installation

To install Hydrosphere on the Kubernetes cluster you should have the following prerequisites fulfilled.

  • PV support on the underlying infrastructure (if persistence is required)

hashtag
Install from charts repository

  1. Add the Hydrosphere charts repository:

  2. Install the chart from repo to the cluster:

hashtag
Install from source

  1. Clone the repository:

  2. Build dependencies:

  3. Install the chart:

After the chart has been installed, you have to expose the ui component outside of the cluster. For the sake of simplicity, we will just port-forward it locally.

To check the installation, open .

Docker registry with pull/push access (if the built-in one is not used)
Docker 18.0+arrow-up-right
Docker Compose 1.23+arrow-up-right
releases pagearrow-up-right
http://localhost/arrow-up-right
Helm 2.9+arrow-up-right
Kubernetes 1.14+ with v1 APIarrow-up-right
http://localhost:8080/arrow-up-right
export HYDROSPHERE_RELEASE=released_version
wget -O hydro-serving-${HYDROSPHERE_RELEASE}.tar.gz https://github.com/Hydrospheredata/hydro-serving/archive/${HYDROSPHERE_RELEASE}.tar.gz
tar -xvf hydro-serving-${HYDROSPHERE_RELEASE}.tar.gz
cd hydro-serving-${HYDROSPHERE_RELEASE}
docker-compose up
git clone https://github.com/Hydrospheredata/hydro-serving
cd hydro-serving
docker-compose up -d
helm repo add hydrosphere https://hydrospheredata.github.io/hydro-serving/helm
helm install --name serving --namespace hydrosphere hydrosphere/serving
git clone https://github.com/Hydrospheredata/hydro-serving.git
cd hydro-serving/helm
helm dependency build serving
helm install --namespace hydrosphere serving
kubectl port-forward -n hydrosphere svc/serving-ui 8080:9090

CLI

Hydrosphere CLI, orhs, is a command-line interface designed to work with the Hydrosphere platform.

Source code: https://github.com/Hydrospheredata/hydro-serving-cliarrow-up-right PyPI: https://pypi.org/project/hs/arrow-up-right

hashtag
Installation

Use pip to install hs:

Check the installation:

hashtag
Usage

hashtag
hs cluster

This command lets you operate cluster instances. A cluster points to your Hydrosphere instance. You can use this command to work with different Hydrosphere instances.

See hs cluster --help for more information.

hashtag
hs upload

This command lets you upload models to the Hydrosphere platform. During the upload, hs looks for a serving.yaml file in the current directory. This file must contain a definition of the model ().

See hs upload --help for more information.

hashtag
hs apply

This command is an extended version of the hs upload command, which also allows you to operate applications and host selector resources.

See hs apply --help for more information.

hashtag
hs profile

This command lets you upload your training data to build profiles.

  • $ hs profile push - upload training data to compute its profiles.

  • $ hs profile status - show profiling status for a given model.

See hs profile --help for more information.

hashtag
hs app

This command provides information about available applications.

  • $ hs app list - list all existing applications.

  • $ hs app rm - remove a certain application.

See hs app --help - for more information.

hashtag
hs model

This command provides information about available models.

  • $ hs model list - list all existing models.

  • $ hs model rm - remove a certain model.

See hs model --help for more information.

example
pip install hs
hs --version

Python SDK

Python SDK offers a simple and convenient way of integrating a user's workflow scripts with Hydrosphere API.

Source code: https://github.com/Hydrospheredata/hydro-serving-sdkarrow-up-right PyPI: https://pypi.org/project/hydrosdk/arrow-up-right

You can learn more about it in its documentation herearrow-up-right.

hashtag
Installation

You can use pip to install hydrosdk

hashtag
Usage

You can access the locally deployed Hydrosphere platform from previous by running the following code:

pip install hydrosdk
steps
from hydrosdk import Cluster, Application 
import pandas as pd

cluster = Cluster("http://localhost", grpc_address="localhost:9090")

app = Application.find(cluster, "my-model")
predictor = app.predictor()

df = pd.read_csv("path/to/data.csv")
for row in df.itertuples(index=False):
    predictor.predict(row)