Skip to content

Commit

Permalink
improved dockerfile: removed changes to bashrc, added gdal version to…
Browse files Browse the repository at this point in the history
… sadasadam pyproject.toml file
  • Loading branch information
lucadelu committed Dec 6, 2023
1 parent 19ec985 commit 5eac795
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions sadasadam.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

FROM ubuntu:22.04 as builder

LABEL version="0.1"
LABEL description="This is a docker file to run sadasadam with last FORCE and GDAL 3.4.1"

# disable interactive frontends
ENV DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -46,13 +49,9 @@ RUN apt-get -y install \
python3-gdal \
pandoc \
r-base \
aria2 && \
# Set python aliases for Python 3.x
echo 'alias python=python3' >> ~/.bashrc \
&& echo 'alias pip=pip3' >> ~/.bashrc \
&& source ~/.bashrc
#
# NumPy is needed for OpenCV, gsutil for level1-csd, landsatlinks for level1-landsat (requires gdal/requests/tqdm)
aria2

# gsutil for level1-csd, landsatlinks for level1-landsat (requires gdal/requests/tqdm)
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir \
gsutil \
Expand Down Expand Up @@ -163,6 +162,12 @@ COPY --chown=docker:docker . .

RUN export -p

RUN export GDAL_VER=$(gdal-config --version); echo $GDAL_VER && \
sed -i -e "s/gdal-utils/gdal-utils == $GDAL_VER/g" pyproject.toml && \
sed -i "s/\"gdal\"/\"gdal == $GDAL_VER\"/g" pyproject.toml

RUN cat pyproject.toml

RUN pip install .

CMD ["sadasadam", "--help"]

0 comments on commit 5eac795

Please sign in to comment.