File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
infrastructure/dockerfiles Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ARG PYTHON_VERSION=3.12
33FROM public.ecr.aws/lambda/python:${PYTHON_VERSION}
44
55# Install system dependencies to compile (numexpr)
6- RUN yum install -y gcc-c++
6+ RUN dnf install -y gcc-c++ && dnf clean all
77
88WORKDIR /tmp
99RUN python -m pip install pip -U
@@ -12,8 +12,6 @@ COPY runtimes/eoapi/raster /tmp/raster
1212RUN python -m pip install "mangum>=0.14,<0.15" /tmp/raster["psycopg-binary"] -t /asset --no-binary pydantic
1313RUN rm -rf /tmp/raster
1414
15- # Remove system dependencies
16- RUN yum remove -y gcc-c++
1715
1816# Reduce package size and remove useless files
1917RUN 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;
@@ -22,6 +20,11 @@ RUN cd /asset && find . -type f -a -name '*.py' -print0 | xargs -0 rm -f
2220RUN find /asset -type d -a -name 'tests' -print0 | xargs -0 rm -rf
2321RUN rm -rdf /asset/numpy/doc/ /asset/boto3* /asset/botocore* /asset/bin /asset/geos_license /asset/Misc
2422
23+ # Ref: https://github.com/developmentseed/titiler/discussions/1108#discussioncomment-13045681
24+ RUN cp /usr/lib64/libexpat.so.1 /asset/
25+
2526COPY infrastructure/handlers/raster_handler.py /asset/handler.py
2627
28+ WORKDIR /asset
29+
2730CMD ["echo", "hello world"]
You can’t perform that action at this time.
0 commit comments