VERSUCHT:
- lokaler Pip zum Komprimieren und Hochladen über S3 (mit Python 3.11/3.12/3.13)
- Docker-Container-Ansatz, der unten beschrieben wird
Code: Select all
FROM amazonlinux:2023
RUN dnf install -y zip python3.11
RUN dnf install -y python3.11-pip
RUN curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
RUN python3 /tmp/get-pip.py
RUN pip3 install setuptools
RUN mkdir /home/layers
RUN mkdir /home/python
Code: Select all
version: '3'
services:
aws-lambda-layers:
build: .
volumes:
- './layers:/home/layers'
working_dir: '/home/'
command: sh -c "python3.11 -m pip install -r layers/requirements.txt -t python/ && zip -r layers/file.zip python/"
Code: Select all
mecab-python3
ipadic
Code: Select all
Unable to import module 'lambda_function': cannot import name '_MeCab' from partially initialized module 'MeCab' (most likely due to a circular import) (/opt/python/MeCab/__init__.py)
Nicht allzu relevant , aber ich habe es geschafft, sudachipy & sudachidict-core mit ähnlichen Methoden wie den oben genannten zum Laufen zu bringen.
Hat es hier bitte jemand geschafft, dass das funktioniert?