Skip to content

Commit

Permalink
Merge branch 'main' into PSCE-309
Browse files Browse the repository at this point in the history
  • Loading branch information
jpower432 committed Jan 16, 2024
2 parents 79645dd + c383112 commit a54ea5f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ FROM python-base AS dependencies
ARG POETRY_VERSION=1.7.1

# https://python-poetry.org/docs/configuration/#using-environment-variables
ENV POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true \
ENV POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1

ENV PATH="$POETRY_HOME/bin:$PATH"

# install poetry - respects $POETRY_HOME
RUN python3.9 -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir poetry=="$POETRY_VERSION"
# install poetry globally just for this intermediate build stage
RUN python3.9 -m pip install --no-cache-dir --upgrade pip setuptools && \
python3.9 -m pip install --no-cache-dir "poetry==$POETRY_VERSION"

WORKDIR "/build"
COPY . "/build"

# Install runtime deps and install the project in non-editable mode.
# Ensure pip and setuptools are updated in the virtualenv as well.
RUN python3.9 -m venv "$VENV_PATH" && \
. "$VENV_PATH"/bin/activate && \
python3.9 -m pip install --no-cache-dir --upgrade pip setuptools && \
poetry install --without tests,dev --no-root && \
poetry build -f wheel -n && \
pip install --no-cache-dir --no-deps dist/*.whl && \
Expand Down

0 comments on commit a54ea5f

Please sign in to comment.