Skip to content

Commit

Permalink
Reduce Quickstart Pipeline image size (#347)
Browse files Browse the repository at this point in the history
Co-authored-by: adriangay  <[email protected]>
  • Loading branch information
aidandunlop and adriangay authored Jul 31, 2024
1 parent d39b920 commit a3bb6d7
Show file tree
Hide file tree
Showing 6 changed files with 4,853 additions and 9 deletions.
21 changes: 19 additions & 2 deletions docs-gen/includes/quickstart/Dockerfile
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}"
Loading

0 comments on commit a3bb6d7

Please sign in to comment.