diff options
author | 2022-09-10 20:44:17 +0100 | |
---|---|---|
committer | 2022-09-11 01:15:23 +0100 | |
commit | 0f12f00c8081462466e6d2d5c8a85945350a76c3 (patch) | |
tree | a63d12d39d82116742f1bdfeb3077c1ecff071eb | |
parent | Add metricity to docker-compose so web doesn't crash loop (diff) |
Update poetry to use 1.2.0
This change requires the use of venvs, rather than pip user installs
-rw-r--r-- | .github/workflows/docs.yaml | 5 | ||||
-rw-r--r-- | .github/workflows/lint-test.yaml | 3 | ||||
-rw-r--r-- | dev/Dockerfile | 22 |
3 files changed, 20 insertions, 10 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index fad707c0..001a498d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,7 +11,6 @@ concurrency: group: docs-deployment-${{ github.ref }} cancel-in-progress: true - jobs: latest-build: # We only need to verify that the docs build with no warnings here @@ -22,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.1 with: dev: true python_version: "3.10" @@ -51,7 +50,7 @@ jobs: fetch-depth: 0 # We need to check out the entire repository to find all tags - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.1 with: dev: true python_version: "3.10" diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 5b8bd5a4..3a9c80a2 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -14,10 +14,9 @@ jobs: lint: name: Run Linting & Test Suites runs-on: ubuntu-latest - steps: - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.1 with: # Set dev=true to run pre-commit which is a dev dependency dev: true diff --git a/dev/Dockerfile b/dev/Dockerfile index eaab04ba..ccc653be 100644 --- a/dev/Dockerfile +++ b/dev/Dockerfile @@ -1,20 +1,32 @@ -FROM python:3.10-slim +FROM --platform=linux/amd64 python:3.10-slim # Set pip to have no saved cache -ENV PIP_NO_CACHE_DIR=false \ - POETRY_VIRTUALENVS_CREATE=false +ENV PIP_NO_CACHE_DIR=1 \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + POETRY_VERSION=1.2.0 \ + POETRY_HOME="/opt/poetry" \ + POETRY_VIRTUALENVS_IN_PROJECT=true \ + POETRY_NO_INTERACTION=1 \ + APP_DIR="/app" + +ENV PATH="$POETRY_HOME/bin:/$APP_DIR/.venv/bin:$PATH" # Install poetry -RUN pip install -U poetry +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get install --no-install-recommends -y curl \ + && apt-get clean && rm -rf /var/lib/apt/lists/* -WORKDIR /app +RUN curl -sSL https://install.python-poetry.org | python # Install project dependencies +WORKDIR $APP_DIR COPY pyproject.toml poetry.lock ./ RUN poetry install --no-root # Copy the source code in last to optimize rebuilding the image COPY . . + # Install again, this time with the root project RUN poetry install |