From 9ba47c422b4f47fe7271f6070d1bceb95f909052 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Wed, 22 May 2024 17:42:06 -0700 Subject: [PATCH] Pre-build wheel for psycopg (3) --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3a27f6e4a..d8ff8c8b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -222,7 +222,13 @@ RUN --mount=type=cache,target=/root/.cache/pip/,id=pip-cache \ && apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \ && python3 -m pip install --no-cache-dir --upgrade wheel \ && echo "Installing Python requirements" \ - && python3 -m pip install --default-timeout=1000 --requirement requirements.txt \ + && curl --fail --silent --show-error --location \ + --output psycopg_c-3.1.19-cp311-cp311-linux_x86_64.whl \ + https://github.com/paperless-ngx/builder/releases/download/psycopg-3.1.19/psycopg_c-3.1.19-cp311-cp311-linux_x86_64.whl \ + && curl --fail --silent --show-error --location \ + --output psycopg_c-3.1.19-cp311-cp311-linux_aarch64.whl \ + https://github.com/paperless-ngx/builder/releases/download/psycopg-3.1.19/psycopg_c-3.1.19-cp311-cp311-linux_aarch64.whl \ + && python3 -m pip install --default-timeout=1000 --find-links . --requirement requirements.txt \ && echo "Patching whitenoise for compression speedup" \ && curl --fail --silent --show-error --location --output 484.patch https://github.com/evansd/whitenoise/pull/484.patch \ && patch -d /usr/local/lib/python3.11/site-packages --verbose -p2 < 484.patch \ @@ -235,6 +241,7 @@ RUN --mount=type=cache,target=/root/.cache/pip/,id=pip-cache \ && apt-get --yes purge ${BUILD_PACKAGES} \ && apt-get --yes autoremove --purge \ && apt-get clean --yes \ + && rm --recursive --force --verbose *.whl \ && rm --recursive --force --verbose /var/lib/apt/lists/* \ && rm --recursive --force --verbose /tmp/* \ && rm --recursive --force --verbose /var/tmp/* \