From e2504dd1418d313d23d615467750d01c94690179 Mon Sep 17 00:00:00 2001 From: Arseny Boykov Date: Tue, 15 Oct 2024 16:36:05 +0200 Subject: [PATCH] Install poetry via pipx in Dockerfile - https://python-poetry.org/docs/#ci-recommendations - https://github.com/pypa/pipx#on-linux --- packages/examples/cvat/exchange-oracle/Dockerfile | 5 +++-- packages/examples/cvat/recording-oracle/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/examples/cvat/exchange-oracle/Dockerfile b/packages/examples/cvat/exchange-oracle/Dockerfile index 86c54f1441..bf13b2af0a 100644 --- a/packages/examples/cvat/exchange-oracle/Dockerfile +++ b/packages/examples/cvat/exchange-oracle/Dockerfile @@ -3,8 +3,8 @@ FROM python:3.10 WORKDIR /app RUN apt-get update -y && \ - apt-get install -y jq ffmpeg libsm6 libxext6 && \ - pip install --no-cache poetry + apt-get install -y jq ffmpeg libsm6 libxext6 pipx && \ + pipx install --pip-args='--no-cache' poetry==1.8.4 COPY pyproject.toml poetry.lock ./ @@ -12,6 +12,7 @@ RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi --no-root \ && poetry cache clear pypi --all +# TODO: Consider moving to multistage builds and system cache for faster builds and smaller images. COPY . . CMD ["sh", "./bin/start_dev.sh"] diff --git a/packages/examples/cvat/recording-oracle/Dockerfile b/packages/examples/cvat/recording-oracle/Dockerfile index 86c54f1441..bf13b2af0a 100644 --- a/packages/examples/cvat/recording-oracle/Dockerfile +++ b/packages/examples/cvat/recording-oracle/Dockerfile @@ -3,8 +3,8 @@ FROM python:3.10 WORKDIR /app RUN apt-get update -y && \ - apt-get install -y jq ffmpeg libsm6 libxext6 && \ - pip install --no-cache poetry + apt-get install -y jq ffmpeg libsm6 libxext6 pipx && \ + pipx install --pip-args='--no-cache' poetry==1.8.4 COPY pyproject.toml poetry.lock ./ @@ -12,6 +12,7 @@ RUN poetry config virtualenvs.create false \ && poetry install --no-interaction --no-ansi --no-root \ && poetry cache clear pypi --all +# TODO: Consider moving to multistage builds and system cache for faster builds and smaller images. COPY . . CMD ["sh", "./bin/start_dev.sh"]