1
-
2
- # Use an official osgeo/gdal image as a parent image
3
1
FROM registry.lapig.iesa.ufg.br/lapig-images-prod/download-minio:base as python-base
4
2
3
+ ENV LAPIG_ENV='dev' \
4
+ PYTHONUNBUFFERED=1 \
5
+ PYTHONDONTWRITEBYTECODE=1 \
6
+ PIP_NO_CACHE_DIR=off \
7
+ PIP_DISABLE_PIP_VERSION_CHECK=on \
8
+ PIP_DEFAULT_TIMEOUT=100 \
9
+ POETRY_VERSION=1.0.5 \
10
+ POETRY_HOME="/opt/poetry" \
11
+ POETRY_VIRTUALENVS_IN_PROJECT=true \
12
+ POETRY_NO_INTERACTION=1 \
13
+ PYSETUP_PATH="/opt/pysetup" \
14
+ VENV_PATH="/opt/pysetup/.venv" \
15
+ PYTHONBREAKPOINT="web_pdb.set_trace"
16
+
17
+ # prepend poetry and venv to path
18
+ ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
19
+
20
+
5
21
# Clone app and npm install on server
6
22
ENV URL_TO_APPLICATION_GITHUB="https://github.com/lapig-ufg/sentinel2-chips.git"
7
23
ENV BRANCH="main"
@@ -16,13 +32,15 @@ WORKDIR /app
16
32
17
33
18
34
RUN apt-get update && \
19
- apt-get install -y git make libpq-dev libpq5 && \
20
- mkdir -p /APP && cd /APP && \
35
+ apt-get install -y git make libgl1-mesa-glx libpq-dev libpq5 && \
36
+ mkdir -p /app && cd /app && \
21
37
git clone -b ${BRANCH} ${URL_TO_APPLICATION_GITHUB} && \
22
- rm -rf /var/lib/apt/lists/* && chmod +x /APP/download-minio/start.sh
38
+ rm -rf /var/lib/apt/lists/*
39
+
40
+ ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
23
41
24
- RUN pip install --no-cache-dir -r requirements.txt
42
+ RUN pip3 install --no-cache-dir -r sentinel2-chips/ requirements.txt
25
43
26
44
# Run app.py when the container launches
27
- CMD ["python" , "s2_cog.py" ]
45
+ CMD ["python" , "sentinel2-chips/ s2_cog.py" ]
28
46
0 commit comments