Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python38 #3475

Merged
merged 6 commits into from Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .lighthouse/jenkins-x/release.yaml
Expand Up @@ -15,7 +15,7 @@ spec:
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream
name: ""
- name: release-step
image: seldonio/core-builder:0.20
image: seldonio/core-builder:0.23
command:
- bash
- -c
Expand Down Expand Up @@ -71,4 +71,3 @@ spec:
serviceAccountName: tekton-bot
timeout: 6h0m0s
status: {}

1 change: 1 addition & 0 deletions ansible/.gitignore
@@ -0,0 +1 @@
.resources
27 changes: 27 additions & 0 deletions ansible/Makefile
@@ -0,0 +1,27 @@
KIND_IMAGE ?= kindest/node:v1.18.15
KIND_NAME ?= ansible

AMBASSADOR_PORT ?= 8003
ISTIO_PORT ?= 8004
MINIO_PORT ?= 8090


# Kind Cluster
kind-cluster:
kind create cluster --name ${KIND_NAME} --image ${KIND_IMAGE} || echo "already there"
kind export kubeconfig --name ${KIND_NAME}
kubectl create ns seldon || echo "already there"
kubectl config set-context --current --namespace seldon

kind-delete:
kind delete cluster --name ${KIND_NAME}

# Port Forwards
port-forward-ambassador:
kubectl port-forward -n ambassador svc/ambassador ${AMBASSADOR_PORT}:80

port-forward-istio:
kubectl port-forward -n istio-system svc/istio-ingressgateway ${ISTIO_PORT}:80

port-forward-minio:
kubectl port-forward -n minio-system svc/minio ${MINIO_PORT}:9000
4 changes: 4 additions & 0 deletions ansible/ansible.cfg
@@ -0,0 +1,4 @@
[defaults]
inventory = ./inventory.ini
roles_path = ./roles
nocows = 1
5 changes: 5 additions & 0 deletions ansible/inventory.ini
@@ -0,0 +1,5 @@
[all:vars]
ansible_python_interpreter=python3

[all]
localhost ansible_connection=local
12 changes: 12 additions & 0 deletions ansible/playbooks/kind_cluster.yaml
@@ -0,0 +1,12 @@
---
- name: Create Kind Cluster and Install MetalLB
hosts: localhost
gather_facts: no
roles:
- seldonio.k8s.kind
- seldonio.k8s.metallb
vars:
kind_cluster_name: ansible
kind_version: v0.11.1
kind_image_version: kindest/node:v1.21.1@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad
kind_kubectl_default_namespace: seldon
36 changes: 36 additions & 0 deletions ansible/playbooks/main.yaml
@@ -0,0 +1,36 @@
---
- name: Install Seldon Core & Prerequisites
hosts: localhost
gather_facts: no
roles:
- role: seldonio.k8s.istio
when: install_istio | bool

- role: seldonio.k8s.ambassador
when: install_ambassador | bool

- role: seldonio.k8s.minio
when: install_minio | bool

- role: seldonio.k8s.seldon_core_analytics
when: install_seldon_core_analytics | bool

- role: seldonio.k8s.seldon_core
when: install_seldon_core | bool

vars:
full_install: yes

install_istio: "{{ full_install }}"
install_ambassador: "{{ full_install }}"
install_minio: "{{ full_install }}"

install_seldon_core_analytics: "{{ full_install }}"
install_seldon_core: "{{ full_install }}"

# Overwrite this variable if you want to DO NOT want to include any variable from defaults
vars_file: vars/default.yaml

pre_tasks:
- name: "Load vars from {{ vars_file }}"
include_vars: "{{ vars_file }}"
58 changes: 58 additions & 0 deletions ansible/playbooks/vars/default.yaml
@@ -0,0 +1,58 @@
########################### Generic Configuration #############################

seldon_system_namespace: seldon-system
seldon_logs_namespace: seldon-logs

seldon_namespaces: [ seldon ]


######################## Seldon Core Configuration ############################

# Version of Seldon Core to be installed, default: master
# This can be any value accepted by "git checkout": branch, tag, SHA, HEAD, etc...
seldon_core_version: v1.9.1

# Local folder of already cloned Seldon Core git repository to be used.
# If defined then `seldon_core_version` will be ignored.
# seldon_core_source_dir: "~/work/seldon-core"

# Helm Values used for Seldon Core installation
seldon_core_values:
istio:
enabled: true
gateway: "seldon-gateway.istio-system.svc.cluster.local"

ambassador:
enabled: true

############################ Istio Configuration ##############################

# Version of Istio to be installed; defaults to 1.7.6
istio_version: 1.10.3

# This flag controls creation of Seldon Gateway, default: true
istio_create_seldon_gateway: true


########################### MinIO Configuration ###############################

# Type of MinIO Service; default: ClusterIP
minio_service_type: LoadBalancer

# Name of rclone-compatible secret; default: seldon-rclone-secret
# If set to "null" then secret will not be written
minio_rclone_secret_name: seldon-rclone-secret

# Name of rclone-compatible secret; default: null
# If set to "null" then secret will not be written
minio_kfserving_secret_name: seldon-kfserving-secret

# List of namespaces to which MinIO secret should be written
minio_secret_namespaces: "{{ seldon_namespaces }}"


#################### Seldon Core Analytics Configuration ######################

# Seldon Core Analytics version: helm chart version, default: null (latest)
seldon_core_analytics_version: v1.9.1
seldon_core_analytics_values: {}
30 changes: 14 additions & 16 deletions doc/source/reference/images.md
Expand Up @@ -5,46 +5,44 @@

| Description | Image URL | Stable Version | Development |
|-------------|-----------|----------------|-------------|
| [Seldon Operator](../workflow/install.md) | [seldonio/seldon-core-operator](https://hub.docker.com/r/seldonio/seldon-core-operator/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Service Orchestrator (Go)](../graph/svcorch.md)| [seldonio/seldon-core-executor](https://hub.docker.com/r/seldonio/executor/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Operator](../workflow/install.md) | [seldonio/seldon-core-operator](https://hub.docker.com/r/seldonio/seldon-core-operator/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Service Orchestrator (Go)](../graph/svcorch.md)| [seldonio/seldon-core-executor](https://hub.docker.com/r/seldonio/executor/tags/) | 1.9.1 | 1.10.0-dev |

## Pre-packaged servers


| Description | Image URL | Version |
|-------------|-----------|---------|
| [MLFlow Server REST](../servers/mlflow.md) | [seldonio/mlflowserver_rest](https://hub.docker.com/r/seldonio/mlflowserver_rest/tags/) | 1.10.0 |
| [MLFlow Server GRPC](../servers/mlflow.md) | [seldonio/mlflowserver_grpc](https://hub.docker.com/r/seldonio/mlflowserver_grpc/tags/) | 1.10.0 |
| [SKLearn Server REST](../servers/sklearn.md) | [seldonio/sklearnserver_rest](https://hub.docker.com/r/seldonio/sklearnserver_rest/tags/) | 1.10.0 |
| [SKLearn Server GRPC](../servers/sklearn.md) | [seldonio/sklearnserver_grpc](https://hub.docker.com/r/seldonio/sklearnserver_grpc/tags/) | 1.10.0 |
| [XGBoost Server REST](../servers/xgboost.md) | [seldonio/xgboostserver_rest](https://hub.docker.com/r/seldonio/xgboostserver_rest/tags/) | 1.10.0 |
| [XGBoost Server GRPC](../servers/xgboost.md) | [seldonio/xgboostserver_grpc](https://hub.docker.com/r/seldonio/xgboostserver_grpc/tags/) | 1.10.0 |
| [MLFlow Server](../servers/mlflow.md) | [seldonio/mlflowserver](https://hub.docker.com/r/seldonio/mlflowserver/tags/) | 1.9.1 |
| [SKLearn Server](../servers/sklearn.md) | [seldonio/sklearnserver](https://hub.docker.com/r/seldonio/sklearnserver/tags/) | 1.9.1 |
| [XGBoost Server](../servers/xgboost.md) | [seldonio/xgboostserver](https://hub.docker.com/r/seldonio/xgboostserver/tags/) | 1.9.1 |

## Language wrappers

| Description | Image URL | Stable Version | Development |
|-------------|-----------|----------------|-------------|
| [Seldon Python 3 (3.6) Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python3](https://hub.docker.com/r/seldonio/seldon-core-s2i-python3/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Python 3.6 Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python36](https://hub.docker.com/r/seldonio/seldon-core-s2i-python36/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Python 3.7 Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python37](https://hub.docker.com/r/seldonio/seldon-core-s2i-python37/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Python 3.6 GPU Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python36-gpu](https://hub.docker.com/r/seldonio/seldon-core-s2i-python36-gpu/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Python 3.7 GPU Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python37-gpu](https://hub.docker.com/r/seldonio/seldon-core-s2i-python37-gpu/tags/) | 1.10.0 | 1.11.0-dev |
| [Seldon Python 3 (3.7) Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python3](https://hub.docker.com/r/seldonio/seldon-core-s2i-python3/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Python 3.6 Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python36](https://hub.docker.com/r/seldonio/seldon-core-s2i-python36/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Python 3.7 Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python37](https://hub.docker.com/r/seldonio/seldon-core-s2i-python37/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Python 3.7 Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python38](https://hub.docker.com/r/seldonio/seldon-core-s2i-python38/tags/) | | 1.10.0-dev |
| [Seldon Python 3.6 GPU Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python36-gpu](https://hub.docker.com/r/seldonio/seldon-core-s2i-python36-gpu/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Python 3.7 GPU Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python37-gpu](https://hub.docker.com/r/seldonio/seldon-core-s2i-python37-gpu/tags/) | 1.9.1 | 1.10.0-dev |
| [Seldon Python 3.8 GPU Wrapper for S2I](../python/python_wrapping_s2i.md) | [seldonio/seldon-core-s2i-python38-gpu](https://hub.docker.com/r/seldonio/seldon-core-s2i-python38-gpu/tags/) | | 1.10.0-dev |

## Server proxies

| Description | Image URL | Stable Version |
|-------------|-----------|----------------|
| [NVIDIA inference server proxy](integration_nvidia_link.rst) | [seldonio/nvidia-inference-server-proxy](https://hub.docker.com/r/seldonio/nvidia-inference-server-proxy/tags/) | 0.1 |
| [SageMaker proxy](https://github.com/SeldonIO/seldon-core/tree/master/integrations/sagemaker) | [seldonio/sagemaker-proxy](https://hub.docker.com/r/seldonio/sagemaker-proxy/tags/) | 0.1 |
| [Tensorflow Serving REST proxy](../servers/tensorflow.md) | [seldonio/tfserving-proxy_rest](https://hub.docker.com/r/seldonio/tfserving-proxy_rest/tags/) | 0.7 |
| [Tensorflow Serving GRPC proxy](../servers/tensorflow.md) | [seldonio/tfserving-proxy_grpc](https://hub.docker.com/r/seldonio/tfserving-proxy_grpc/tags/) | 0.7 |
| [Tensorflow Serving proxy](../servers/tensorflow.md) | [seldonio/tfserving-proxy](https://hub.docker.com/r/seldonio/tfserving-proxy/tags/) | 1.9.1 |


## Python modules

| Description | Python Version | Version |
|-------------|----------------|---------|
| [seldon-core](https://pypi.org/project/seldon-core/) | >3.4,<3.7 | 1.10.0 |
| [seldon-core](https://pypi.org/project/seldon-core/) | >3.4,<3.9 | 1.9.1 |
| [seldon-core](https://pypi.org/project/seldon-core/) | 2,>=3,<3.7 | 0.2.6 (deprecated) |


Expand Down
1 change: 1 addition & 0 deletions examples/models/keras_cifar10/.gitignore
@@ -0,0 +1 @@
model.h5
12 changes: 8 additions & 4 deletions wrappers/s2i/python/Dockerfile
@@ -1,16 +1,20 @@
ARG CONDA_VERSION
ARG BASE_IMAGE
ARG IMAGE_VERSION
FROM $BASE_IMAGE:$IMAGE_VERSION

LABEL io.openshift.s2i.scripts-url="image:///s2i/bin"

# This is to install desired version of Python without updating conda version
# Note: ARGs must be after FROM statement , see source:
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact

ARG PYTHON_VERSION
ARG CONDA_VERSION

RUN conda install --yes python=$PYTHON_VERSION conda=$CONDA_VERSION
RUN dnf install -y make automake gcc gcc-c++

# Upgrade pip version
# Pin pip and setuptools
RUN pip install pip==20.2 setuptools==46.1

RUN mkdir microservice
Expand All @@ -19,10 +23,10 @@ WORKDIR /microservice
COPY ./s2i/bin/ /s2i/bin

# keep install of seldon-core after the COPY to force re-build of layer
COPY requirements.txt ./requirements.txt
COPY version.txt /microservice/version.txt
COPY _python/python/licenses/license.txt .
RUN pip install -r requirements.txt
COPY _python /microservice
RUN cd /microservice/python && pip install .

RUN mkdir -p /.conda && chmod a+rwx /.conda
RUN yum -y update-minimal --security --sec-severity=Important --sec-severity=Critical
Expand Down
4 changes: 2 additions & 2 deletions wrappers/s2i/python/Dockerfile.conda
Expand Up @@ -11,8 +11,8 @@ ENV PATH /opt/conda/bin:$PATH
RUN dnf update -y && \
dnf install -y wget bzip2 ca-certificates curl git

ARG CONDA_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-$CONDA_VERSION-Linux-x86_64.sh -O ~/miniconda.sh && \
ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
Expand Down
5 changes: 3 additions & 2 deletions wrappers/s2i/python/Dockerfile.gpu
Expand Up @@ -16,8 +16,8 @@ RUN apt-get update -y && apt-get install -qy --no-install-recommends \
ENV PATH /opt/conda/bin:$PATH

# Install Miniconda3
ARG CONDA_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
Expand All @@ -30,6 +30,7 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}

# This is to install desired version of Python without updating conda version
ARG PYTHON_VERSION
ARG CONDA_VERSION
RUN conda install --yes python=$PYTHON_VERSION conda=$CONDA_VERSION
RUN apt-get update --yes && apt-get install --yes gcc make build-essential

Expand Down
34 changes: 0 additions & 34 deletions wrappers/s2i/python/Dockerfile.local

This file was deleted.

24 changes: 9 additions & 15 deletions wrappers/s2i/python/Makefile
Expand Up @@ -2,7 +2,10 @@ IMAGE_VERSION := $(shell cat ../../../version.txt)
SHELL:=/bin/bash

PYTHON_VERSION=3.7.10
CONDA_VERSION=4.7.12

CONDA_DOWNLOAD_VERSION=4.7.12
CONDA_VERSION=4.10.3

IMAGE_PYTHON_VERSION=`echo -n $(PYTHON_VERSION) | cut -d. -f1-2 | sed 's/\.//g'`
DEFAULT_IMAGE_PYTHON_VERSION=`echo -n $(PYTHON_VERSION) | cut -d. -f1`
IMAGE_NAME = docker.io/seldonio/seldon-core-s2i-python${IMAGE_PYTHON_VERSION}
Expand All @@ -21,23 +24,15 @@ get_local_repo:
cp ../../../version.txt version.txt
cp -r $(SELDON_CORE_DIR)/python _python


.PHONY: build
build: get_local_repo
set -x && docker build -f Dockerfile --build-arg IMAGE_VERSION=${IMAGE_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${CONDA_BASE_IMAGE} -t $(IMAGE_NAME):$(IMAGE_VERSION) .
docker tag $(IMAGE_NAME):$(IMAGE_VERSION) $(IMAGE_NAME)-ubi8:$(IMAGE_VERSION)

.PHONY: build_gpu
build_gpu: get_local_repo
docker build -f Dockerfile.gpu --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} -t ${GPU_IMAGE_NAME}:${IMAGE_VERSION} .

.PHONY: build_local
build_local: get_local_repo
set -x && docker build -f Dockerfile.local --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${CONDA_BASE_IMAGE} --build-arg IMAGE_VERSION=${IMAGE_VERSION} -t $(IMAGE_NAME):$(IMAGE_VERSION) .


.PHONY: build_redhat
build_redhat: get_local_repo
set -x && docker build -f Dockerfile.local --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${CONDA_BASE_IMAGE} --build-arg IMAGE_VERSION=${IMAGE_VERSION} -t $(IMAGE_NAME)-ubi8:$(IMAGE_VERSION) .
set -x && docker build -f Dockerfile.gpu --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg CONDA_DOWNLOAD_VERSION=${CONDA_DOWNLOAD_VERSION} -t ${GPU_IMAGE_NAME}:${IMAGE_VERSION} .


tag_base_python:
Expand All @@ -48,10 +43,9 @@ push_to_dockerhub_base_python:

push_to_dockerhub:
docker push $(IMAGE_NAME):$(IMAGE_VERSION)

push_redhat_to_dockerhub:
docker push $(IMAGE_NAME)-ubi8:$(IMAGE_VERSION)


push_gpu_to_dockerhub:
docker push ${GPU_IMAGE_NAME}:${IMAGE_VERSION}

Expand All @@ -62,7 +56,7 @@ test:

.PHONY: test_local
test_local:
docker build -f Dockerfile.local --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${BASE_IMAGE} -t $(IMAGE_NAME)-candidate .
docker build -f Dockerfile --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${BASE_IMAGE} -t $(IMAGE_NAME)-candidate .
IMAGE_NAME=$(IMAGE_NAME)-candidate test/run

.PHONY: clean
Expand All @@ -80,7 +74,7 @@ after_build_image_seldon_core_check:


build_conda_base:
docker build -f Dockerfile.conda --build-arg CONDA_VERSION=${CONDA_VERSION} -t ${CONDA_BASE_IMAGE}:${IMAGE_VERSION} .
docker build -f Dockerfile.conda --build-arg CONDA_DOWNLOAD_VERSION=${CONDA_DOWNLOAD_VERSION} -t ${CONDA_BASE_IMAGE}:${IMAGE_VERSION} .

push_to_dockerhub_conda_base:
docker push $(CONDA_BASE_IMAGE):$(IMAGE_VERSION)