File tree Expand file tree Collapse file tree 4 files changed +10
-4
lines changed
infrastructure/dockerfiles Expand file tree Collapse file tree 4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}
44
55ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
66
7- RUN pip install psycopg[binary,pool]
7+ RUN python -m pip install psycopg[binary,pool]
88
99COPY runtimes/eoapi/raster /tmp/raster
10- RUN pip install /tmp/raster
10+ RUN python -m pip install /tmp/raster
1111RUN rm -rf /tmp/raster
1212
1313ENV MODULE_NAME eoapi.raster.app
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}
55ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
66
77COPY runtimes/eoapi/stac /tmp/stac
8- RUN pip install /tmp/stac
8+ RUN python -m pip install /tmp/stac
99RUN rm -rf /tmp/stac
1010
1111ENV MODULE_NAME eoapi.stac.app
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ARG PYTHON_VERSION=3.11
33FROM ghcr.io/vincentsarago/uvicorn-gunicorn:${PYTHON_VERSION}
44
55COPY runtimes/eoapi/vector /tmp/vector
6- RUN pip install /tmp/vector
6+ RUN python -m pip install /tmp/vector
77RUN rm -rf /tmp/vector
88
99ENV MODULE_NAME eoapi.vector.app
Original file line number Diff line number Diff line change @@ -2,13 +2,19 @@ ARG PYTHON_VERSION=3.11
22
33FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
44
5+ # Install system dependencies to compile (numexpr)
6+ RUN yum install -y gcc-c++
7+
58WORKDIR /tmp
69RUN python -m pip install pip -U
710
811COPY runtimes/eoapi/raster /tmp/raster
912RUN python -m pip install "mangum>=0.14,<0.15" /tmp/raster["psycopg-binary"] -t /asset --no-binary pydantic
1013RUN rm -rf /tmp/raster
1114
15+ # Remove system dependencies
16+ RUN yum remove -y gcc-c++
17+
1218# Reduce package size and remove useless files
1319RUN cd /asset && find . -type f -name '*.pyc' | while read f; do n=$(echo $f | sed 's/__pycache__\///' | sed 's/.cpython-[0-9]*//'); cp $f $n; done;
1420RUN cd /asset && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm -rf
You can’t perform that action at this time.
0 commit comments