Spaces:
Sleeping
Sleeping
Soumik Bose commited on
Commit ·
a940793
1
Parent(s): 6974bca
ok
Browse files2 unmodified lines3456786710891213101112131614151816171819222021242526222324282526272832292 unmodified linesENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ APP_HOME=/app \ FILE_STORAGE_ROOT=/app/storage PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR ${APP_HOME}WORKDIR /app
RUN apt-get update \ && apt-get install -y --no-install-recommends curl \RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ && rm -rf /var/lib/apt/lists/*
RUN useradd --create-home --uid 1000 appuserRUN useradd -m -u 1000 user
COPY --chown=appuser:appuser requirements.txt ${APP_HOME}/requirements.txtCOPY --chown=user:user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=appuser:appuser . ${APP_HOME}COPY --chown=user:user . .
RUN mkdir -p ${FILE_STORAGE_ROOT}/documents/pdfs \ && mkdir -p ${FILE_STORAGE_ROOT}/documents/images \ && chown -R appuser:appuser ${FILE_STORAGE_ROOT}RUN mkdir -p /app/documents/pdfs /app/documents/images \ && chown -R user:user /app/documents
USER appuserUSER user
EXPOSE 7860
CMD ["sh","-c","while true; do sleep 300; curl -fsS https://reconciliation-file-upload-service.hf.space/ping >/dev/null || true; done & uvicorn app.main:app --host 0.0.0.0 --port 7860 --workers 1"]CMD ["sh", "-c", "while true; do sleep 300; curl -s https://reconciliation-file-upload-service.hf.space/ping > /dev/null; done & uvicorn app.main:app --host 0.0.0.0 --port 7860 --workers 1"]Dockerfile+11-14