Skip to content
Snippets Groups Projects
Commit bf9d05d4 authored by Pierre-Gilles Levallois's avatar Pierre-Gilles Levallois
Browse files

Install libgirepository1.0-dev and modify gdal install

parent 2da719ab
Branches
Tags
1 merge request!6Fully functional version that calculate layer with all stages
Pipeline #51961 passed
##################################################################################
# Taken from https://github.com/Toblerity/Fiona/issues/1063
##################################################################################
FROM debian:10
#buster-slim
FROM python:3.8.16-slim-bullseye
# Arguments
ARG NAMESPACE_ENV
......@@ -11,28 +10,15 @@ ARG DB_PORT_ENV
ARG DB_NAME_ENV
ARG DB_USER_ENV
# Getting some Args and Setting some ENV variables
ENV CPLUS_INCLUDE_PATH="/usr/include/gdal"
ENV C_INCLUDE_PATH="/usr/include/gdal"
# ENV PROJ_LIB="/usr/local/lib/python3.7/dist-packages/pyproj/proj_dir/share/proj"
ENV PROJ_LIB="/usr/local/lib/python3.7/dist-packages/fiona/proj_data/"
ENV GDAL_DATA="/usr/local/lib/python3.7/dist-packages/fiona/gdal_data/"
# Debug verbosity
ENV PROJ_DEBUG=3
ENV NS_ENV=$NAMESPACE_ENV
ENV DB_HOST="$DB_HOST_ENV-$NAMESPACE_ENV"
ENV DB_PORT=$DB_PORT_ENV
ENV DB_NAME=$DB_NAME_ENV
ENV DB_USER=$DB_USER_ENV
# Basic libs and install python3.7
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y procps wget python3.7 python3-pip gdal-bin libgdal-dev apt-utils git \
&& apt-get install -y procps wget python3-pip gdal-bin libgdal-dev apt-utils git \
&& apt-get clean \
apt-get -y install proj proj-dev && \
# https://stackoverflow.com/questions/70508775/error-could-not-build-wheels-for-pycairo-which-is-required-to-install-pyprojec
apt-get install -y libcairo2 libcairo2-dev && \
# https://stackoverflow.com/questions/18025730/pygobject-2-28-6-wont-configure-no-package-gobject-introspection-1-0-found
apt-get install -y libgirepository1.0-dev && \
################################# Debug and diagnose tools #################################
apt-get install -qy apt-utils vim iputils-ping net-tools telnet curl && \
apt-get install -qy postgresql-client && \
......@@ -43,7 +29,9 @@ COPY ./scripts/requirements.txt requirements.txt
# Pip
RUN python3 -m pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version` \
# https://github.com/Toblerity/Fiona/issues/1063
&& pip install --no-binary fiona,rasterio fiona rasterio \
# && pip install --no-cache-dir --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version` \
&& pip install --no-cache-dir --ignore-installed PyYAML \
# https://stackoverflow.com/questions/70508775/error-could-not-build-wheels-for-pycairo-which-is-required-to-install-pyprojec
&& pip install --no-cache-dir manimlib \
......
# Fiona==1.8.21
# geopandas==0.10.2
# numpy==1.21.6
# OWSLib==0.26.0
# pandas==1.3.5
# pathos==0.2.9
# psycopg2-binary==2.9.3
# pycrypto==2.6.1
# PyGObject==3.30.4
# python-dotenv==0.20.0
# requests==2.21.0
# Shapely==1.8.2
asn1crypto==0.24.0
attrs==21.4.0
blinker==1.4
certifi==2018.8.24
chardet==3.0.4
click==8.1.3
click-plugins==1.1.1
cligj==0.7.2
cloud-init==20.4.1
configobj==5.0.6
cryptography==2.6.1
dill==0.3.5.1
distlib==0.3.6
distro-info==0.21
entrypoints==0.3
fail2ban==0.10.2
filelock==3.8.2
Fiona==1.8.21
geopandas==0.10.2
idna==2.6
importlib-metadata==4.12.0
Jinja2==2.10
jsonpatch==1.21
jsonpointer==1.10
jsonschema==2.6.0
keyring==17.1.1
keyrings.alt==3.1.1
MarkupSafe==1.1.0
multiprocess==0.70.13
munch==2.5.0
numpy==1.21.6
oauthlib==2.1.0
OWSLib==0.26.0
pandas==1.3.5
pathos==0.2.9
pipenv==2022.11.30
platformdirs==2.6.0
pox==0.3.1
ppft==1.7.6.5
psycopg2-binary==2.9.3
pycrypto==2.6.1
pycurl==7.43.0.2
PyGObject==3.30.4
pyinotify==0.9.6
PyJWT==1.7.0
pyproj==3.2.1
python-apt==1.8.4.3
python-dateutil==2.8.2
python-dotenv==0.20.0
pytz==2022.1
pyxdg==0.25
PyYAML==3.13
requests==2.21.0
Rtree==1.0.0
SecretStorage==2.3.1
Shapely==1.8.2
six==1.12.0
systemd-python==234
typing_extensions==4.3.0
unattended-upgrades==0.1
urllib3==1.24.1
virtualenv==20.17.1
virtualenv-clone==0.5.7
zipp==3.8.1
\ No newline at end of file
# asn1crypto==0.24.0
# attrs==21.4.0
# blinker==1.4
# certifi==2018.8.24
# chardet==3.0.4
# click==8.1.3
# click-plugins==1.1.1
# cligj==0.7.2
# # cloud-init==20.4.1
# configobj==5.0.6
# cryptography==2.6.1
# dill==0.3.5.1
# distlib==0.3.6
# distro-info==0.21
# entrypoints==0.3
# fail2ban==0.10.2
# filelock==3.8.2
# Fiona==1.8.21
# geopandas==0.10.2
# idna==2.6
# importlib-metadata==4.12.0
# Jinja2==2.10
# jsonpatch==1.21
# jsonpointer==1.10
# jsonschema==2.6.0
# keyring==17.1.1
# keyrings.alt==3.1.1
# MarkupSafe==1.1.0
# multiprocess==0.70.13
# munch==2.5.0
# numpy==1.21.6
# oauthlib==2.1.0
# OWSLib==0.26.0
# pandas==1.3.5
# pathos==0.2.9
# pipenv==2022.11.30
# platformdirs==2.6.0
# pox==0.3.1
# ppft==1.7.6.5
# psycopg2-binary==2.9.3
# pycrypto==2.6.1
# pycurl==7.43.0.2
# PyGObject==3.30.4
# pyinotify==0.9.6
# PyJWT==1.7.0
# pyproj==3.2.1
# python-apt==1.8.4.3
# python-dateutil==2.8.2
# python-dotenv==0.20.0
# pytz==2022.1
# pyxdg==0.25
# PyYAML==3.13
# requests==2.21.0
# Rtree==1.0.0
# SecretStorage==2.3.1
# Shapely==1.8.2
# six==1.12.0
# systemd-python==234
# typing_extensions==4.3.0
# unattended-upgrades==0.1
# urllib3==1.24.1
# virtualenv==20.17.1
# virtualenv-clone==0.5.7
# zipp==3.8.1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment