Nneji123 / Automatic-License-Plate-Detection-Recognition-API

Automatic Vehicle Number Plate Detection and Recognition API
http://avnprapp.herokuapp.com
MIT License
15 stars 3 forks source link

Error running docker swarm #3

Closed gaffner closed 2 months ago

gaffner commented 2 months ago
[+] Building 294.2s (11/11) FINISHED                                                                                                                                                          docker:desktop-linux
 => [app internal] load build definition from Dockerfile                                                                                                                                                      0.1s
 => => transferring dockerfile: 466B                                                                                                                                                                          0.0s
 => [app internal] load metadata for docker.io/library/python:3.8.13-slim-bullseye                                                                                                                            3.5s
 => [app internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 80B                                                                                                                                                                              0.0s
 => [app 1/7] FROM docker.io/library/python:3.8.13-slim-bullseye@sha256:dd46e1cb12432c17040638acb05508c35dc828db04f4f33c692d3894b7bc76cf                                                                      7.4s
 => => resolve docker.io/library/python:3.8.13-slim-bullseye@sha256:dd46e1cb12432c17040638acb05508c35dc828db04f4f33c692d3894b7bc76cf                                                                          0.0s
 => => sha256:e238bceb29579b6804c25c4e8c81612003af698ef4ca42c46fa87d4ef371653c 1.08MB / 1.08MB                                                                                                                1.0s
 => => sha256:9c37eda4ff12eb9bd68ee8feacb78034f4524716d57673ff0a0ad82f88df487c 11.33MB / 11.33MB                                                                                                              2.5s
 => => sha256:dd46e1cb12432c17040638acb05508c35dc828db04f4f33c692d3894b7bc76cf 1.86kB / 1.86kB                                                                                                                0.0s
 => => sha256:db831ae8c7e88ca6f69465a7c3f255c03678e830a1ad13c2a340bec9fc232d3e 1.37kB / 1.37kB                                                                                                                0.0s
 => => sha256:bdd3315885d481d5b81d7bd1af8b04dffc67decf793d6716708750b673e46b6d 7.53kB / 7.53kB                                                                                                                0.0s
 => => sha256:7a6db449b51b92eac5c81cdbd82917785343f1664b2be57b22337b0a40c5b29d 31.38MB / 31.38MB                                                                                                              3.4s
 => => sha256:120078faa76053c068cf75960a6db2a9473ef941fdf2971b724769de253f534f 233B / 233B                                                                                                                    1.4s
 => => sha256:2d3523ccd6f419b6f4643fe4d472243848803763261afa6947386fcb161bcd16 3.18MB / 3.18MB                                                                                                                2.4s
 => => extracting sha256:7a6db449b51b92eac5c81cdbd82917785343f1664b2be57b22337b0a40c5b29d                                                                                                                     2.3s
 => => extracting sha256:e238bceb29579b6804c25c4e8c81612003af698ef4ca42c46fa87d4ef371653c                                                                                                                     0.1s
 => => extracting sha256:9c37eda4ff12eb9bd68ee8feacb78034f4524716d57673ff0a0ad82f88df487c                                                                                                                     0.7s
 => => extracting sha256:120078faa76053c068cf75960a6db2a9473ef941fdf2971b724769de253f534f                                                                                                                     0.0s
 => => extracting sha256:2d3523ccd6f419b6f4643fe4d472243848803763261afa6947386fcb161bcd16                                                                                                                     0.4s
 => [app internal] load build context                                                                                                                                                                         0.7s
 => => transferring context: 8.53MB                                                                                                                                                                           0.7s
 => [app 2/7] WORKDIR /app                                                                                                                                                                                    1.0s
 => [app 3/7] RUN apt-get -y update && apt-get install -y   wget   ffmpeg   libsm6   libxext6                                                                                                                58.3s
 => [app 4/7] RUN pip install --upgrade setuptools                                                                                                                                                            6.6s
 => [app 5/7] COPY . .                                                                                                                                                                                        0.1s
 => [app 6/7] RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu   && pip install -r requirements.txt                                                      207.7s
 => ERROR [app 7/7] RUN python download.py                                                                                                                                                                    9.3s
------
 > [app 7/7] RUN python download.py:
0.356 --2024-08-17 12:16:14--  https://archive.org/download/anpr_weights/weights.pt
0.367 Resolving archive.org (archive.org)... 207.241.224.2
0.407 Connecting to archive.org (archive.org)|207.241.224.2|:443... connected.
0.955 HTTP request sent, awaiting response... 302 Found
1.234 Location: https://ia801509.us.archive.org/18/items/anpr_weights/weights.pt [following]
1.234 --2024-08-17 12:16:14--  https://ia801509.us.archive.org/18/items/anpr_weights/weights.pt
1.234 Resolving ia801509.us.archive.org (ia801509.us.archive.org)... 207.241.228.159
1.256 Connecting to ia801509.us.archive.org (ia801509.us.archive.org)|207.241.228.159|:443... connected.
1.828 HTTP request sent, awaiting response... 404 Not Found
2.057 2024-08-17 12:16:15 ERROR 404: Not Found.
2.057
8.507 /bin/sh: 1: git: not found
8.508 /usr/local/lib/python3.8/site-packages/setuptools/sandbox.py:15: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
8.508   import pkg_resources
8.508 /usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py:3144: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
8.508 Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
8.508   declare_namespace(pkg)
8.508 /usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py:3144: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
8.508 Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
8.508   declare_namespace(pkg)
8.508 Downloaded files!
8.509 Traceback (most recent call last):
8.509   File "/app/utils/google_utils.py", line 26, in attempt_download
8.509     assets = [x['name'] for x in response['assets']]  # release assets
8.509 KeyError: 'assets'
8.509
8.509 During handling of the above exception, another exception occurred:
8.509
8.509 Traceback (most recent call last):
8.509   File "download.py", line 8, in <module>
8.509     from detections import get_plates_from_image
8.509   File "/app/detections.py", line 44, in <module>
8.509     model = attempt_load(weights, map_location=device)  # load FP32 model
8.509   File "/app/models/experimental.py", line 243, in attempt_load
8.509     attempt_download(w)
8.509   File "/app/utils/google_utils.py", line 31, in attempt_download
8.509     tag = subprocess.check_output('git tag', shell=True).decode().split()[-1]
8.509   File "/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
8.509     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
8.509   File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
8.509     raise CalledProcessError(retcode, process.args,
8.509 subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 127.
------
failed to solve: process "/bin/sh -c python download.py" did not complete successfully: exit code: 1
Nneji123 commented 2 months ago

The archive where the model was stored has been deleted by the owner. That's why that error occurs.

Unfortunately I won't be able to resolve it.