File size: 1,874 Bytes
787b7c1 7c6fa68 a5a70f7 cef51c1 e0b709e 233631f 7c6fa68 a5a70f7 233631f 9954ac1 cef51c1 e0b709e 7c6fa68 3f763b7 7c6fa68 a5a70f7 463d79e 7c6fa68 3f763b7 7c6fa68 e0b709e a5a70f7 7c6fa68 cef51c1 e0b709e cef51c1 |
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 |
FROM registry.gitlab.com/aletrn/gis-prediction:1.11.9
# Include global arg in this stage of the build
ARG WORKDIR_ROOT="/var/task"
ENV VIRTUAL_ENV=${WORKDIR_ROOT}/.venv PATH="${WORKDIR_ROOT}/.venv/bin:$PATH"
ENV WRITE_TMP_ON_DISK=""
ENV MOUNT_GRADIO_APP=""
ENV VITE__STATIC_INDEX_URL="/static"
ENV VITE__INDEX_URL="/"
ENV HOME_USER=/home/python
# Set working directory to function root directory
WORKDIR ${WORKDIR_ROOT}
# workaround for missing /home folder
RUN ls -ld ${HOME_USER}
RUN ls -lA ${HOME_USER}
COPY --chown=python:python app.py ${WORKDIR_ROOT}/
COPY --chown=python:python pyproject.toml poetry.lock README.md ${WORKDIR_ROOT}
# RUN . ${WORKDIR_ROOT}/.venv && which python && echo "# install samgis #" && pip install .
RUN if [ "${WRITE_TMP_ON_DISK}" != "" ]; then mkdir {WRITE_TMP_ON_DISK}; fi
RUN if [ "${WRITE_TMP_ON_DISK}" != "" ]; then ls -l {WRITE_TMP_ON_DISK}; fi
RUN ls -l /usr/bin/which
RUN /usr/bin/which python
RUN python --version
RUN pip list
RUN echo "PATH: ${PATH}."
RUN echo "WORKDIR_ROOT: ${WORKDIR_ROOT}."
RUN ls -l ${WORKDIR_ROOT}
RUN ls -ld ${WORKDIR_ROOT}
RUN ls -l ${WORKDIR_ROOT}/
RUN ls -l ${WORKDIR_ROOT}/sam-quantized/
RUN ls -l ${WORKDIR_ROOT}/sam-quantized/machine_learning_models
RUN ls -ld ${WORKDIR_ROOT}/sam-quantized/machine_learning_models
RUN python -c "import sys; print(sys.path)"
RUN python -c "import fastapi"
RUN python -c "import geopandas"
RUN python -c "import onnxruntime"
RUN python -c "import rasterio"
RUN python -c "import uvicorn"
RUN python -c "import jinja2"
RUN df -h
RUN ls -l ${WORKDIR_ROOT}/app.py
RUN ls -l ${WORKDIR_ROOT}/static/
RUN ls -l ${WORKDIR_ROOT}/static/dist
RUN ls -l ${WORKDIR_ROOT}/static/node_modules
USER 999
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl -f http://localhost:7860/health
|