Skip to content

Commit

Permalink
revert: "fix: Make build compatible with new GDAL container TDE-1179 (#…
Browse files Browse the repository at this point in the history
…971)" (#975)

#### Motivation

This reverts commit 719d96e.
We are not using GDAL 3.9 and we had issues running the container within
Argo Workflows since this change that modified how the Python
environment is managed.
There are some jobs that need to be run on Argo workflows this week so
we need to allow user to do it while we are finding a fix for the Argo
issue.

#### Modification

_Why is this change being made? What implications or other
considerations are there?_

#### Checklist

_If not applicable, provide explanation of why._

- [ ] Tests updated
- [ ] Docs updated
- [ ] Issue linked in Title
  • Loading branch information
paulfouquet authored May 24, 2024
1 parent cbaaa13 commit 3990bf9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 32 deletions.
35 changes: 10 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,20 @@
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.4@sha256:60d3bc2f8b09ca1a7ef2db0239699b2c03713aa02be6e525e731c0020bbb10a4 as builder

# Avoid blocking `apt-get install` commands
ARG DEBIAN_FRONTEND=noninteractive

ENV TZ=Etc/UTC
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.4@sha256:60d3bc2f8b09ca1a7ef2db0239699b2c03713aa02be6e525e731c0020bbb10a4

RUN apt-get update
# Install pipx and build dependencies
RUN apt-get install --assume-yes gcc libgeos-dev pipx python3-dev
# Install Poetry with the bundle plugin
RUN pipx install poetry
RUN pipx inject poetry poetry-plugin-bundle
# Install pip
RUN apt-get install python3-pip -y
# Install Poetry
RUN pip install poetry

# Define the working directory for the following commands
WORKDIR /src
WORKDIR /app

# Add Poetry config
COPY poetry.lock pyproject.toml /src/
COPY poetry.lock pyproject.toml /app/

# Bundle production dependencies into /venv
RUN /root/.local/bin/poetry bundle venv --no-ansi --no-interaction --only=main -vvv /venv


FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.4@sha256:60d3bc2f8b09ca1a7ef2db0239699b2c03713aa02be6e525e731c0020bbb10a4

ENV TZ=Etc/UTC

# Copy just the bundle from the first stage
COPY --from=builder /venv /venv
# Install Python dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --only main --no-interaction --no-ansi

# Copy Python scripts
COPY ./scripts/ /app/scripts/
Expand All @@ -36,5 +23,3 @@ ENV PYTHONPATH="/app"
ENV GTIFF_SRS_SOURCE="EPSG"

WORKDIR /app/scripts

ENTRYPOINT ["./docker-entrypoint.sh"]
7 changes: 0 additions & 7 deletions scripts/docker-entrypoint.sh

This file was deleted.

0 comments on commit 3990bf9

Please sign in to comment.