Skip to content

Commit e6db8aa

Browse files
Try adding scipy and django
1 parent 4f1f4f6 commit e6db8aa

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed

Diff for: k8/Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ push-images: docker-bake.json
8686
docker buildx bake --push
8787

8888

89+
test-%: docker-bake.json
90+
docker buildx bake --push $(*F)
91+
docker run \
92+
--rm \
93+
-e PYTHON_RECORD_API_OUTPUT_FILE=/tmp/d/out.jsonl \
94+
-v (pwd)/tmp:/tmp/d \
95+
$(call sub_image,$(*F))
96+
97+
8998
# push-images: $(addprefix push-image-,$(IMAGES))
9099

91100
# push-image-%:

Diff for: k8/images/django/Dockerfile

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# syntax = docker/dockerfile:1.1.7-experimental
2+
ARG FROM
3+
FROM ${FROM}
4+
5+
WORKDIR /usr/src/app
6+
7+
# https://github.com/django/django-docker-box/blob/master/Dockerfile#L4
8+
RUN apt-get update && \
9+
apt-get -y install --no-install-recommends \
10+
build-essential \
11+
libsqlite3-mod-spatialite binutils libproj-dev gdal-bin libgdal20 libgeoip1 \
12+
libpq-dev \
13+
unzip libaio1 \
14+
libenchant1c2a \
15+
gettext \
16+
wget \
17+
&& apt-get clean
18+
19+
# https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#quickstart
20+
RUN git clone \
21+
--branch 3.0.8 \
22+
--depth 1 \
23+
git://github.com/django/django.git \
24+
.
25+
26+
WORKDIR /usr/src/app/tests
27+
RUN --mount=type=cache,target=/root/.cache/pip \
28+
pip install \
29+
-e .. \
30+
-r requirements/py3.txt \
31+
-r requirements/postgres.txt
32+
33+
RUN python -c "import django"
34+
ENV DJANGO_SETTINGS_MODULE=settings.test_sqlite_gis
35+
ENV PYTHON_RECORD_API_FROM_MODULES=django
36+
CMD sh -c 'python runtests.py || exit 0'

Diff for: k8/images/django/version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0

Diff for: k8/images/scipy/Dockerfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# syntax = docker/dockerfile:1.1.7-experimental
2+
ARG FROM
3+
FROM ${FROM}
4+
5+
WORKDIR /usr/src/app
6+
7+
# https://scipy.github.io/devdocs/building/linux.html#debian-ubuntu
8+
RUN apt-get update && \
9+
apt-get -y install --no-install-recommends \
10+
gcc gfortran python-dev libopenblas-dev liblapack-dev cyt \
11+
&& apt-get clean
12+
13+
# https://scipy.github.io/devdocs/dev/contributor/development_workflow.html
14+
RUN git clone \
15+
--branch v1.5.1 \
16+
--depth 1 \
17+
git://github.com/scipy/scipy.git \
18+
.
19+
20+
WORKDIR /usr/src/app/tests
21+
22+
RUN --mount=type=cache,target=/root/.cache/pip \
23+
pip install pytest-custom_exit_code
24+
25+
RUN --mount=type=cache,target=/root/.cache/pip \
26+
python setup.py build_ext --inplace
27+
28+
RUN python -c "import scipy"
29+
ENV PYTHON_RECORD_API_FROM_MODULES=scipy
30+
CMD python runtests.py -v -- --suppress-tests-failed-exit-code

Diff for: k8/images/scipy/version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0

0 commit comments

Comments
 (0)