File size: 1,329 Bytes
c446951 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
FROM public.ecr.aws/lambda/python:3.10
WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
RUN yum update -y && yum install -y \
ffmpeg \
libsm6 \
libxext6 \
python3-pip \
git \
zlib-devel \
libjpeg-devel \
gcc \
mesa-libGL \
pango \
&& yum clean all
COPY requirements/requirements.clip.txt \
requirements/requirements.cpu.txt \
requirements/requirements.http.txt \
requirements/requirements.hosted.txt \
requirements/requirements.doctr.txt \
requirements/_requirements.txt \
./
RUN /var/lang/bin/python3.10 -m pip install --upgrade pip && rm -rf ~/.cache/pip
RUN pip3 install \
certifi==2022.12.07 \
setuptools==65.5.1 \
-r _requirements.txt \
-r requirements.clip.txt \
-r requirements.cpu.txt \
-r requirements.http.txt \
-r requirements.hosted.txt \
-r requirements.doctr.txt \
mangum \
--upgrade \
--target "${LAMBDA_TASK_ROOT}" \
&& rm -rf ~/.cache/pip
COPY inference ${LAMBDA_TASK_ROOT}/inference
COPY docker/config/lambda.py ${LAMBDA_TASK_ROOT}/lambda.py
ENV LAMBDA=True
ENV CORE_MODEL_SAM_ENABLED=False
ENV ALLOW_NUMPY_INPUT=False
ENV INFERENCE_SERVER_ID=HostedInferenceLambda
ENV DISABLE_VERSION_CHECK=true
ENV DOCTR_MULTIPROCESSING_DISABLE=TRUE
WORKDIR ${LAMBDA_TASK_ROOT}
CMD [ "lambda.handler" ] |