File size: 1,373 Bytes
7650159
0914710
 
 
 
 
 
 
 
 
 
 
fcb8c81
0914710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8783164
0914710
7650159
 
 
0914710
 
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
FROM registry.gitlab.com/aletrn/gis-lisa-base:1.2.3

# Include global arg in this stage of the build
ARG LAMBDA_TASK_ROOT="/var/task"
ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
ENV VIRTUAL_ENV=${LAMBDA_TASK_ROOT}/.venv \
    PATH="${LAMBDA_TASK_ROOT}/.venv/bin:$PATH"
ENV IS_AWS_LAMBDA=""

# Set working directory to function root directory
WORKDIR ${LAMBDA_TASK_ROOT}

COPY samgis_lisa_on_cuda ${LAMBDA_TASK_ROOT}/samgis_lisa_on_cuda
COPY wrappers ${LAMBDA_TASK_ROOT}/wrappers

RUN ls -l /usr/bin/which
RUN /usr/bin/which python
RUN python -v
RUN echo "PYTHONPATH: ${PYTHONPATH}."
RUN echo "PATH: ${PATH}."
RUN echo "LAMBDA_TASK_ROOT: ${LAMBDA_TASK_ROOT}."
RUN ls -l ${LAMBDA_TASK_ROOT}
RUN ls -ld ${LAMBDA_TASK_ROOT}
RUN ls -l ${LAMBDA_TASK_ROOT}/machine_learning_models
RUN python -c "import sys; print(sys.path)"
RUN python -c "import cv2"
RUN python -c "import fastapi"
RUN python -c "import geopandas"
RUN python -c "import loguru"
RUN python -c "import onnxruntime"
RUN python -c "import rasterio"
RUN python -c "import uvicorn"
RUN df -h
RUN ls -l ${LAMBDA_TASK_ROOT}/samgis_lisa_on_zero/
RUN ls -l ${LAMBDA_TASK_ROOT}/wrappers/
RUN ls -l ${FASTAPI_STATIC}/
RUN ls -l ${FASTAPI_STATIC}/dist
RUN ls -l ${FASTAPI_STATIC}/node_modules

CMD ["uvicorn", "wrappers.fastapi_wrapper:app", "--host", "0.0.0.0", "--port", "7860"]