Skip to content

Commit

Permalink
removing virtual environment in Dockerfile, seems to confuse Nextflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JudithBernett committed Nov 21, 2024
1 parent f4e0d05 commit ff560a1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ FROM python:3.10-buster as builder

RUN pip install poetry==1.8.4

# POETRY_VIRTUALENVS_CREATE=1: Makes sure that environment will be as isolated as possible and above all that
# installation will not mess up with the system Python or, even worse, with Poetry itself.
# POETRY_CACHE_DIR: When removing the cache folder, make sure this is done in the same RUN command. If it’s done in a
# separate RUN command, the cache will still be part of the previous Docker layer (the one containing poetry install )
# effectively rendering your optimization useless.

ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache

WORKDIR /root
Expand All @@ -34,10 +30,9 @@ FROM python:3.10-slim-buster as runtime
LABEL image.author.name="Judith Bernett"
LABEL image.author.email="[email protected]"

ENV VIRTUAL_ENV=/root/.venv \
PATH="/root/.venv/bin:$PATH"

COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
# Copy installed dependencies from the builder image
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin

# Copy all relevant code

Expand Down

0 comments on commit ff560a1

Please sign in to comment.