Spaces:
Sleeping
Sleeping
FROM python:3.10-slim | |
# Define environment variables | |
ENV APPS_HOME=/usr/local/cognizant \ | |
ELUC_APP_HOME=/usr/local/cognizant/eluc \ | |
GDAL_VERSION=3.7.1 \ | |
PYTHONPATH=/usr/local/cognizant/eluc | |
# Debian basics and cleaning up in one RUN statement to reduce image size | |
RUN apt-get update -y && \ | |
apt-get install --no-install-recommends curl git gcc g++ libgdal-dev -y && \ | |
rm -rf /var/lib/apt/lists/* | |
# Set work directory | |
WORKDIR ${ELUC_APP_HOME} | |
# Dependencies | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir --upgrade pip && \ | |
pip install --no-cache-dir -r requirements.txt | |
# To get permissions to write to the container | |
RUN useradd -m -u 1000 user | |
USER user | |
# 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"] |