Skip to content

Commit

Permalink
Disable lambda layers for Python 3.12 due to incompatible dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Belval committed Jan 31, 2024
1 parent 0a36560 commit e0f4912
Showing 1 changed file with 1 addition and 73 deletions.
74 changes: 1 addition & 73 deletions .github/workflows/lambda_layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,6 @@ jobs:
with:
name: textractor-lambda-p311
path: lambda_layer/
lambda-build-p312:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=.
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312
path: lambda_layer/
lambda-build-p38-pandas:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.8:latest
Expand Down Expand Up @@ -150,23 +134,6 @@ jobs:
with:
name: textractor-lambda-p311-pandas
path: lambda_layer/
lambda-build-p312-pandas:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=. && \
pip3 install pandas --target=.
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312-pandas
path: lambda_layer/
lambda-build-p38-pdf:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.8:latest
Expand Down Expand Up @@ -320,43 +287,4 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p311-pdf
path: lambda_layer/
lambda-build-p312-pdf:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install Poppler
run: yum install -y poppler-utils which mlocate openjpeg-devel libjpeg-devel fontconfig-devel libtiff-devel libpng-devel && updatedb && mkdir -p lambda_layer/python/bin
- name: Copy dependencies
run: |
cp /usr/lib64/libpoppler.so* lambda_layer/python/bin/ && \
cp $(which pdftoppm) lambda_layer/python/bin/ && \
cp $(which pdfinfo) lambda_layer/python/bin/ && \
cp $(which pdftocairo) lambda_layer/python/bin/ && \
cp /usr/lib64/libjpeg.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libopenjpeg.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libpng.so* lambda_layer/python/bin/ && \
cp /lib64/libz.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libfreetype.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libfontconfig.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libnss3.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libsmime3.so* lambda_layer/python/bin/ && \
cp /usr/lib64/liblcms2.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libtiff.so* lambda_layer/python/bin/ && \
cp /lib64/libexpat.so* lambda_layer/python/bin/ && \
cp /usr/lib64/libjbig.so* lambda_layer/python/bin/
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=. && \
pip3 install pdf2image --target=. && \
cd .. \
&& zip -r /textractor.zip python/
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312-pdf
path: lambda_layer/
path: lambda_layer/

0 comments on commit e0f4912

Please sign in to comment.