From 21c296d84203e371e20c9c1804961618083526f5 Mon Sep 17 00:00:00 2001 From: Michael Fitzmaurice Date: Wed, 17 May 2023 10:08:23 +0100 Subject: [PATCH] Replace base docker image (#188) * Replace the base image in the docker file * Add the script that enables image smoke testing in the CodeBuild CD build * Fix the shebang in the container validation script --- Dockerfile | 8 ++++---- run-tests.sh | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 run-tests.sh diff --git a/Dockerfile b/Dockerfile index 9bbb3f6e..813cdccc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,14 @@ -FROM python:3.7-slim-stretch +FROM python:3.7.16-bullseye RUN apt-get update \ && apt-get upgrade -y \ -&& apt-get -y install libspatialindex-dev tk-dev --no-install-recommends \ +&& apt-get -y install libspatialindex-dev libgdal-dev tk-dev --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && /usr/local/bin/python -m pip install --upgrade pip COPY . . -RUN pip3 install -e . +RUN pip install -e .[planner] ENV PYTHONPATH=./scripts:${PYTHONPATH} -ENTRYPOINT ["python3"] \ No newline at end of file +ENTRYPOINT ["python3"] diff --git a/run-tests.sh b/run-tests.sh new file mode 100755 index 00000000..c994ea54 --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# exit script if any step returns a non-0 code +set -e + +echo "Executing environment tests..." + +pytest -vv tests/ +./scripts/code-qa/notebooks-smoke-test.sh + +echo "Tests complete"