Skip to content

Commit

Permalink
fix: add gcc10 to AL2 image; build numpy and pandas from source (#3069)
Browse files Browse the repository at this point in the history
  • Loading branch information
kukushking authored Jan 10, 2025
1 parent 9e319f0 commit ccdbb42
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
16 changes: 14 additions & 2 deletions building/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ RUN yum install -y \
libxslt-devel \
bison \
make \
gcc \
gcc-c++ \
gcc10 \
gcc10-c++ \
flex \
autoconf \
zip \
Expand All @@ -20,12 +20,24 @@ RUN yum install -y \

WORKDIR /root

ENV CC=/usr/bin/gcc10-cc
ENV CXX=/usr/bin/gcc10-c++
ENV LD=/usr/bin/gcc10-gcc

RUN ln -s /usr/bin/gcc10-gcc /usr/bin/gcc
RUN ln -s /usr/bin/gcc10-g++ /usr/bin/g++
RUN ln -s /usr/bin/gcc10-nm /usr/bin/nm
RUN ln -s /usr/bin/gcc10-ar /usr/bin/ar
RUN ln -s /usr/bin/gcc10-mpn /usr/bin/mpn
RUN ln -s /usr/bin/gcc10-ld /usr/bin/ld

FROM ${python_version}
COPY pyproject.toml poetry.lock ./

RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8
RUN pip3 install --upgrade urllib3==1.26.16 # temporary to avoid https://github.com/urllib3/urllib3/issues/2168 (TODO remove when the AL2 image updates to support OpenSSL 1.1.1+)
RUN pip3 install --upgrade six cython cmake hypothesis poetry
ENV PIP_NO_BINARY="numpy,pandas"
RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main

RUN rm -f pyproject.toml poetry.lock
Expand Down
1 change: 1 addition & 0 deletions building/lambda/Dockerfile.al2023
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ COPY pyproject.toml poetry.lock ./

RUN pip3 install --upgrade pip wheel setuptools>=64 setuptools_scm>=8
RUN pip3 install --upgrade six cython cmake hypothesis poetry
ENV PIP_NO_BINARY="numpy,pandas"
RUN poetry config virtualenvs.create false --local && poetry install --no-root --only main

RUN rm -f pyproject.toml poetry.lock
Expand Down
2 changes: 1 addition & 1 deletion building/lambda/build-lambda-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ popd

pushd /aws-sdk-pandas

pip3 install . -t ./python ".[redshift,mysql,postgres,gremlin,opensearch,openpyxl]"
pip3 install . --no-binary numpy,pandas -t ./python ".[redshift,mysql,postgres,gremlin,opensearch,openpyxl]"

rm -rf python/pyarrow*
rm -rf python/boto*
Expand Down

0 comments on commit ccdbb42

Please sign in to comment.