From ff560a1b974f622c939489f79ad6828ef6006cff Mon Sep 17 00:00:00 2001 From: Judith Bernett Date: Thu, 21 Nov 2024 16:31:36 +0100 Subject: [PATCH] removing virtual environment in Dockerfile, seems to confuse Nextflow --- Dockerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f5715d..9bb3a12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -34,10 +30,9 @@ FROM python:3.10-slim-buster as runtime LABEL image.author.name="Judith Bernett" LABEL image.author.email="judith.bernett@tum.de" -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