Skip to content

Commit 01938e3

Browse files
committed
ok docker
1 parent dccc9cb commit 01938e3

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

docker/dev/Dockerfile

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
2-
# Use an official osgeo/gdal image as a parent image
31
FROM registry.lapig.iesa.ufg.br/lapig-images-prod/download-minio:base as python-base
42

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+
521
# Clone app and npm install on server
622
ENV URL_TO_APPLICATION_GITHUB="https://github.com/lapig-ufg/sentinel2-chips.git"
723
ENV BRANCH="main"
@@ -16,13 +32,15 @@ WORKDIR /app
1632

1733

1834
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 && \
2137
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
2341

24-
RUN pip install --no-cache-dir -r requirements.txt
42+
RUN pip3 install --no-cache-dir -r sentinel2-chips/requirements.txt
2543

2644
# Run app.py when the container launches
27-
CMD ["python", "s2_cog.py"]
45+
CMD ["python", "sentinel2-chips/s2_cog.py"]
2846

docker/prod/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN apt-get update && \
2222
rm -rf /var/lib/apt/lists/* && chmod +x /APP/download-minio/start.sh
2323

2424
RUN pip install --no-cache-dir -r requirements.txt
25-
25+
RUN pip install GDAL
2626
# Run app.py when the container launches
2727
CMD ["python", "s2_cog.py"]
2828

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ opencv-python==4.8.0.74
55
opencv-python-headless==4.8.0.74
66
pymongo==4.4.1
77
loguru==0.7.2
8-
dynaconf==3.1.11
8+
dynaconf==3.1.11
9+
GDAL==3.6.0
10+
sat-search
11+
shapely

0 commit comments

Comments
 (0)