Skip to content

Commit

Permalink
Bump python to 3.11 for serving runtime images and Bump poetry to 1.8…
Browse files Browse the repository at this point in the history
….3 (kserve#3812)

* Upgrade serving runtime python version to 3.11 and debian to bookworm

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Upgrade poetry to 1.8.3

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Upgrade openjdk to 17 for pmml

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Fix 'AS' casing warning

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

* Fix pmml server

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>

---------

Signed-off-by: Sivanantham Chinnaiyan <sivanantham.chinnaiyan@ideas2it.com>
  • Loading branch information
sivanantha321 authored Jul 27, 2024
1 parent 3862175 commit f9e7d5a
Show file tree
Hide file tree
Showing 38 changed files with 171 additions and 171 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.21 as builder
FROM golang:1.21 AS builder

# Copy in the go src
WORKDIR /go/src/github.com/kserve/kserve
Expand Down
2 changes: 1 addition & 1 deletion agent.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the inference-agent binary
FROM golang:1.21 as builder
FROM golang:1.21 AS builder

# Copy in the go src
WORKDIR /go/src/github.com/kserve/kserve
Expand Down
10 changes: 5 additions & 5 deletions python/aiffairness.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

# Required for building packages for arm64 arch
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev build-essential && apt-get clean && \
Expand All @@ -32,7 +32,7 @@ COPY aiffairness aiffairness
RUN cd aiffairness && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
3 changes: 2 additions & 1 deletion python/aiffairness/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions python/artexplainer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

# Required for building packages for arm64 arch
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev build-essential && apt-get clean && \
Expand All @@ -32,7 +32,7 @@ COPY artexplainer artexplainer
RUN cd artexplainer && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
3 changes: 3 additions & 0 deletions python/artexplainer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions python/custom_model.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -28,7 +28,7 @@ COPY custom_model custom_model
RUN cd custom_model && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
3 changes: 3 additions & 0 deletions python/custom_model/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions python/custom_model_grpc.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -28,7 +28,7 @@ COPY custom_model custom_model
RUN cd custom_model && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
10 changes: 5 additions & 5 deletions python/custom_tokenizer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -28,7 +28,7 @@ COPY custom_tokenizer custom_tokenizer
RUN cd custom_tokenizer && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
3 changes: 3 additions & 0 deletions python/custom_tokenizer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions python/custom_transformer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -28,7 +28,7 @@ COPY custom_transformer custom_transformer
RUN cd custom_transformer && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
3 changes: 3 additions & 0 deletions python/custom_transformer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions python/custom_transformer_grpc.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -28,7 +28,7 @@ COPY custom_transformer custom_transformer
RUN cd custom_transformer && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
10 changes: 5 additions & 5 deletions python/error_404_isvc.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ARG PYTHON_VERSION=3.9
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bullseye
ARG PYTHON_VERSION=3.11
ARG BASE_IMAGE=python:${PYTHON_VERSION}-slim-bookworm
ARG VENV_PATH=/prod_venv

FROM ${BASE_IMAGE} as builder
FROM ${BASE_IMAGE} AS builder

RUN apt-get update && apt-get install -y gcc python3-dev && apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install Poetry
ARG POETRY_HOME=/opt/poetry
ARG POETRY_VERSION=1.7.1
ARG POETRY_VERSION=1.8.3

RUN python3 -m venv ${POETRY_HOME} && ${POETRY_HOME}/bin/pip install poetry==${POETRY_VERSION}
ENV PATH="$PATH:${POETRY_HOME}/bin"
Expand All @@ -33,7 +33,7 @@ COPY test_resources/graph/error_404_isvc error_404_isvc
RUN cd error_404_isvc && poetry install --no-interaction --no-cache


FROM ${BASE_IMAGE} as prod
FROM ${BASE_IMAGE} AS prod

COPY third_party third_party

Expand Down
Loading

0 comments on commit f9e7d5a

Please sign in to comment.