Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image ghcr.io/mapproxy/mapproxy/mapproxy:2.0.2-dev doesn't contain necessary pip packages #900

Open
Dronis2000 opened this issue Feb 28, 2024 · 5 comments
Labels

Comments

@Dronis2000
Copy link

Image ghcr.io/mapproxy/mapproxy/mapproxy:2.0.2-dev gets error on startup:
Found libproj >=5. Using this library without pyproj is deprecated and not fully supported. Please install pyproj >= 2. Traceback (most recent call last): File "/usr/local/bin/mapproxy-util", line 5, in <module> from mapproxy.script.util import main File "/usr/local/lib/python3.10/site-packages/mapproxy/script/util.py", line 29, in <module> from mapproxy.script.conf.app import config_command File "/usr/local/lib/python3.10/site-packages/mapproxy/script/conf/app.py", line 32, in <module> from .sources import sources File "/usr/local/lib/python3.10/site-packages/mapproxy/script/conf/sources.py", line 17, in <module> from mapproxy.srs import SRS File "/usr/local/lib/python3.10/site-packages/mapproxy/srs.py", line 26, in <module> from mapproxy.proj import USE_PROJ4_API File "/usr/local/lib/python3.10/site-packages/mapproxy/proj.py", line 282, in <module> res = try_import() File "/usr/local/lib/python3.10/site-packages/mapproxy/proj.py", line 155, in try_libproj_import libproj = init_libproj() File "/usr/local/lib/python3.10/site-packages/mapproxy/proj.py", line 66, in init_libproj libproj.pj_init_plus.argtypes = [c_char_p] File "/usr/local/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/local/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /lib/x86_64-linux-gnu/libproj.so.25: undefined symbol: pj_init_plus

Context

I tried to run the dev docker image (ghcr.io/mapproxy/mapproxy/mapproxy:2.0.2-dev) in Kubernetes. The container started, but didn't display home page on port 8080. Logs contain error (see above).

Expected Behavior

I can see MapProxy homepage on port 8080.

Actual Behavior

The port 8080 is unaccessible.

Possible Fix

To fix the problem I added pip packages pyproj and boto3 to docker image and saved new image to my local docker registry. My Dockerfile:
FROM ghcr.io/mapproxy/mapproxy/mapproxy:2.0.2-dev
RUN pip3 install pyproj boto3

Steps to Reproduce

Context

Your Environment

  • Version used: 2.0.2, docker image ghcr.io/mapproxy/mapproxy/mapproxy:2.0.2-dev
@simonseyock
Copy link
Contributor

I can reproduce the error and will work on a fix.

@simonseyock
Copy link
Contributor

I created this PR for this: #909

is the boto3 dependency really needed to run mapproxy or is this something needed for additional functionality?

@shimoncohen
Copy link
Contributor

I created this PR for this: #909

is the boto3 dependency really needed to run mapproxy or is this something needed for additional functionality?

The boto3 is used for s3 caches which I would consider a core part in mapproxy (cannot differentiate between different cache types). There is an option to use http instead of boto, but I think boto is the default.

@simonseyock
Copy link
Contributor

Sorry for the late response, but I was not sure before if my fix was applicable in the first place. What version of boto3 should be included? ==1.34 would be the current one. Or can we use >=1 or something to make builds with older python versions possible? @weskamm can you say something about this?

@weskamm
Copy link
Member

weskamm commented Apr 9, 2024

builds passed for all supported python versions with 1.34 before, so no need to lower that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants