Skip to content

Commit

Permalink
Install poetry via pipx in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobronium committed Oct 15, 2024
1 parent 8771512 commit e2504dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/examples/cvat/exchange-oracle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ 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 ./

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"]
5 changes: 3 additions & 2 deletions packages/examples/cvat/recording-oracle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ 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 ./

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"]

0 comments on commit e2504dd

Please sign in to comment.