Skip to content

Geopandas and Fiona success! #51

Description

@jcary741

Not sure how to document this, but I managed to build a container with Geopandas and Fiona based on this project. Thanks so much!

A couple gotchas:

  1. I had to add the following at the top of my handler file
import pyproj
pyproj.datadir.set_data_dir(os.path.join(os.path.dirname(__file__), 'share/proj'))
  1. In order to get the final package size below 250MB, I used the following options for pip (based on https://github.com/szelenka/shrink-linalg) and trim some fluff:
RUN CFLAGS="-g0 -Wl,--strip-all -I/usr/include:/usr/local/include -L/usr/lib:/usr/local/lib" \
            pip install \
            --no-cache-dir \
            --compile \
            --global-option=build_ext \
            --global-option="-j 4" \
            --no-binary :all: \
            --target ${PACKAGE_PREFIX}/ \ fiona pandas geopandas shapely pyproj
# Remove tests, docs, and examples
RUN cd $PREFIX && rm -rf **/tests/ **/_testing/ **/doc/ **/examples/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions