FROM python:3.10-slim # Debian basics and cleaning up in one RUN statement to reduce image size ENV GDAL_VERSION=3.7.1 RUN apt-get update -y && \ apt-get install --no-install-recommends curl git gcc g++ libgdal-dev -y && \ rm -rf /var/lib/apt/lists/* # To get permissions to write to the container RUN useradd -m -u 1000 user USER user # Define environment variables ENV APPS_HOME=/home/user/local/cognizant \ ELUC_APP_HOME=/home/user/local/cognizant/eluc \ PYTHONPATH=/home/user/local/cognizant/eluc \ PATH=/home/user/.local/bin:$PATH # Set work directory WORKDIR ${ELUC_APP_HOME} # Dependencies COPY --chown=user requirements.txt . RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy source files over COPY --chown=user . . # Expose Flask (Dash) port EXPOSE 7860 # Run main UI ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "45", "app.app:server"]