File size: 878 Bytes
6d95c4c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5a2ad83
 
 
 
6d95c4c
5a2ad83
6d95c4c
 
5a2ad83
6d95c4c
 
 
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
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"]