From c1c8e0aa4e058e688309432eb45faaabf048ee76 Mon Sep 17 00:00:00 2001 From: Teddy Caddy Date: Fri, 29 Dec 2023 15:40:19 -0500 Subject: [PATCH 1/2] Update `README.md` to specify `--platform linux/amd64` for building the image * The image will not build with `arm64` architecture --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83a477c..b68c99c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Schema reference implementations for multiple cities. ### Docker-based installation 1. Build the container - docker build -t opensidewalks-data . + docker build --platform linux/amd64 -t opensidewalks-data . ## Extract a single region's data From e1fbb5d47075f8029327d09871a124ad8b796c77 Mon Sep 17 00:00:00 2001 From: Teddy Caddy Date: Fri, 29 Dec 2023 15:41:57 -0500 Subject: [PATCH 2/2] Hacky workaround to deal with `numpy` version issues * The project is pinned to other Python libraries that expect `numpy.bool()` and `numpy.object()` to be functions. * Those functions got removed in `numpy` versions >= `1.20` --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1ad8234..7c9a7eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,3 +20,7 @@ COPY ./datahelpers /work/datahelpers RUN pip install /work/datahelpers # RUN poetry install + +RUN \ + sed -i '/import pandas._libs.testing as _testing/i np.bool = np.bool_' /usr/local/lib/python3.8/site-packages/pandas/util/testing.py && \ + sed -i '/import numpy as np/a np.object = np.object_' /usr/local/lib/python3.8/site-packages/pandas/core/internals/construction.py \ No newline at end of file