pyronear / pyro-platform

Detection & monitoring platform of wildfires
https://platform.pyronear.org/
Apache License 2.0
10 stars 11 forks source link

[build] Cannot run docker successfully #76

Closed frgfm closed 2 years ago

frgfm commented 2 years ago

As per #72, I can confirm that the docker doesn't run successfully. There seems to be some required version pins here!

Building the docker with:

docker-compose up -d --build

yields

WARNING: The DEBUG variable is not set. Defaulting to a blank string.
Building web
Sending build context to Docker daemon  1.882MB
Step 1/7 : FROM python:3.7.9-slim
 ---> 95df6bf70e35
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> c8c938e7e585
Step 3/7 : ENV PYTHONDONTWRITEBYTECODE 1
 ---> Using cache
 ---> 45b476295104
Step 4/7 : ENV PYTHONUNBUFFERED 1
 ---> Using cache
 ---> edeef09e68cc
Step 5/7 : COPY ./requirements.txt /usr/src/app/requirements.txt
 ---> Using cache
 ---> 3cf0867ec129
Step 6/7 : RUN apt-get update     && apt-get install --no-install-recommends -y git     && pip install --upgrade pip setuptools wheel     && pip install -r /usr/src/app/requirements.txt     && apt-get purge --autoremove -y git     && rm -rf /root/.cache/pip     && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> ce68001bf820
Step 7/7 : COPY app/ /usr/src/app/
 ---> 7914773827c7
Successfully built 7914773827c7
Successfully tagged pyro-platform_web:latest
Recreating pyro-platform_web_1 ... done

which is normal

but checking the logs, the container crashes:

Attaching to pyro-platform_web_1
web_1  | main.py:47: UserWarning: 
web_1  | The dash_core_components package is deprecated. Please replace
web_1  | `import dash_core_components as dcc` with `from dash import dcc`
web_1  |   import dash_core_components as dcc
web_1  | main.py:48: UserWarning: 
web_1  | The dash_html_components package is deprecated. Please replace
web_1  | `import dash_html_components as html` with `from dash import html`
web_1  |   import dash_html_components as html
web_1  | Traceback (most recent call last):
web_1  |   File "main.py", line 68, in <module>
web_1  |     from alert_screen import AlertScreen, build_no_alert_detected_screen, build_alert_detected_screen
web_1  |   File "/usr/src/app/alert_screen.py", line 22, in <module>
web_1  |     from alerts import retrieve_site_from_device_id
web_1  |   File "/usr/src/app/alerts.py", line 38, in <module>
web_1  |     import dash_leaflet.express as dlx
web_1  |   File "/usr/local/lib/python3.7/site-packages/dash_leaflet/express.py", line 1, in <module>
web_1  |     import geobuf
web_1  |   File "/usr/local/lib/python3.7/site-packages/geobuf/__init__.py", line 1, in <module>
web_1  |     from .encode import Encoder
web_1  |   File "/usr/local/lib/python3.7/site-packages/geobuf/encode.py", line 9, in <module>
web_1  |     from . import geobuf_pb2
web_1  |   File "/usr/local/lib/python3.7/site-packages/geobuf/geobuf_pb2.py", line 36, in <module>
web_1  |     type=None),
web_1  |   File "/usr/local/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__
web_1  |     _message.Message._CheckCalledFromGeneratedFile()
web_1  | TypeError: Descriptors cannot not be created directly.
web_1  | If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
web_1  | If you cannot immediately regenerate your protos, some other possible workarounds are:
web_1  |  1. Downgrade the protobuf package to 3.20.x or lower.
web_1  |  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
web_1  | 
web_1  | More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates