-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consolidate training and serving image builds
- Loading branch information
Jonny Browning
committed
Jul 27, 2023
1 parent
15b4c98
commit e0939cf
Showing
10 changed files
with
41 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM python:3.9.16-slim AS builder | ||
|
||
ENV PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 | ||
|
||
ARG POETRY_VERSION=1.5.1 | ||
|
||
COPY pyproject.toml pyproject.toml | ||
COPY poetry.lock poetry.lock | ||
|
||
RUN pip install poetry==${POETRY_VERSION} | ||
RUN poetry config virtualenvs.create false && poetry install | ||
|
||
FROM builder AS training | ||
|
||
COPY training/train.py training/train.py | ||
|
||
FROM builder AS serving | ||
|
||
RUN poetry install --with serving | ||
COPY serving/main.py serving/main.py | ||
|
||
CMD exec uvicorn serving.main:app --host "0.0.0.0" --port "$AIP_HTTP_PORT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
steps: | ||
- name: 'gcr.io/kaniko-project/executor:latest' | ||
args: | ||
- --destination=${_DESTINATION_IMAGE_URI} | ||
- --target=${_DOCKER_TARGET} | ||
- --cache=true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters