Skip to content

Commit

Permalink
Make sure to install poetry in production image as well
Browse files Browse the repository at this point in the history
  • Loading branch information
bdb-dd committed Jan 22, 2024
1 parent b86404e commit e052ea5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ WORKDIR $PYSETUP_PATH
COPY poetry.lock pyproject.toml ./

# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
# --> also download required ColBERT model files
RUN --mount=type=cache,target=/root/.cache \
poetry install --no-root

# --> also download required ColBERT model files
COPY ./docs_qa/preload_colbert.py ./app/docs_qa/preload_colbert.py
RUN poetry run python ./app/docs_qa/preload_colbert.py

Expand All @@ -90,6 +90,10 @@ WORKDIR $PYSETUP_PATH
COPY --from=builder-base $POETRY_HOME $POETRY_HOME
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH

# install runtime deps - uses $POETRY_VIRTUALENVS_IN_PROJECT internally
RUN --mount=type=cache,target=/root/.cache \
poetry install --no-root

# copy in our app files
COPY --from=builder-base /app/ /app/
WORKDIR /app/
Expand Down

0 comments on commit e052ea5

Please sign in to comment.