-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce Quickstart Pipeline image size (#347)
Co-authored-by: adriangay <[email protected]>
- Loading branch information
1 parent
d39b920
commit a3bb6d7
Showing
6 changed files
with
4,853 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
# TFX build | ||
FROM tensorflow/tfx:1.13.0 | ||
FROM python:3.10.12 as builder | ||
|
||
RUN mkdir /data | ||
RUN wget https://raw.githubusercontent.com/tensorflow/tfx/master/tfx/examples/penguin/data/labelled/penguins_processed.csv -P /data | ||
|
||
RUN pip install poetry==1.7.1 | ||
|
||
COPY pyproject.toml . | ||
COPY poetry.lock . | ||
|
||
RUN poetry config virtualenvs.create true | ||
RUN poetry config virtualenvs.in-project true | ||
RUN poetry install --no-root | ||
|
||
FROM python:3.10.12-slim as runtime | ||
|
||
ENV VIRTUAL_ENV=/.venv \ | ||
PATH="/.venv/bin:$PATH" | ||
|
||
WORKDIR /pipeline | ||
|
||
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} | ||
COPY --from=builder /data /data | ||
|
||
COPY penguin_pipeline/*.py ./ | ||
|
||
ENV PYTHONPATH="/pipeline:${PYTHONPATH}" |
Oops, something went wrong.