From 80ec86228a0098c790013808290cc311bc28afde Mon Sep 17 00:00:00 2001 From: Jury Razumau Date: Fri, 12 Jul 2024 23:17:42 +0200 Subject: [PATCH 1/4] update mmh3 to 4.1.0 New mmh3 versions have wheels for more platforms. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 329bd13..e46c86c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ pytz==2023.3.post1 six==1.16.0 sqlparse==0.4.4 python-dotenv==1.0.0 -mmh3==3.1.0 +mmh3==4.1.0 numpy==1.26.1 From eb8d2590b38507452cfa3c563751ec260546dd27 Mon Sep 17 00:00:00 2001 From: Jury Razumau Date: Fri, 12 Jul 2024 23:19:54 +0200 Subject: [PATCH 2/4] clean up after running apt-get --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d892770..3239383 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,9 @@ COPY requirements.txt /tmp/requirements.txt RUN apt-get update && \ apt-get upgrade -y && \ - apt-get install -y curl + apt-get install -y curl && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* RUN set -ex && \ pip install --upgrade pip && \ From 1374bd1ef21120476f77a7d7a7bd9a679bd21578 Mon Sep 17 00:00:00 2001 From: Jury Razumau Date: Fri, 12 Jul 2024 23:20:50 +0200 Subject: [PATCH 3/4] switch to slim-bookworm image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since newer mmh3 comes with wheels for ARM, we can switch to slim-bookworm (which doesn’t have gcc). --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3239383..b522562 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.12-bookworm +ARG PYTHON_VERSION=3.12-slim-bookworm FROM python:${PYTHON_VERSION} From c184c911f18ff8ffd873fb16acd6e2d37afe87a0 Mon Sep 17 00:00:00 2001 From: Jury Razumau Date: Fri, 12 Jul 2024 23:21:29 +0200 Subject: [PATCH 4/4] stop copying venv into docker image --- .dockerignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index 21569b8..487af5d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,5 @@ fly.toml .env *.log .DS_Store +venv/ +