diff --git a/Dockerfile b/Dockerfile index 8b723cf3..3dbb8019 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,9 +12,10 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Install GDAL dependencies -RUN apt-get update \ - && apt-get install -y binutils libproj-dev gdal-bin - +FROM curlimages/curl:7.81.0 as curl-step +ARG GDAL_WHEELS_URL=https://prefeitura-rio.github.io/storage/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl +RUN curl -sSLo /tmp/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl $GDAL_WHEELS_URL + # Setting environment with prefect version ARG PREFECT_VERSION=1.4.1 ENV PREFECT_VERSION $PREFECT_VERSION @@ -28,4 +29,7 @@ RUN python3 -m pip install --no-cache-dir -U "pip>=21.2.4" "prefect==$PREFECT_VE # Install requirements WORKDIR /app COPY . . -RUN python3 -m pip install --prefer-binary --no-cache-dir -U . \ No newline at end of file +COPY --from=curl-step /tmp/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl /tmp/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl +RUN python3 -m pip install --prefer-binary --no-cache-dir -U . \ + python3 -m pip install --no-cache-dir /tmp/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl && \ + rm /tmp/GDAL-3.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl \ No newline at end of file