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

Unable to install on raspberry pi #12

Open
alexroumi opened this issue Jan 13, 2024 · 4 comments
Open

Unable to install on raspberry pi #12

alexroumi opened this issue Jan 13, 2024 · 4 comments

Comments

@alexroumi
Copy link

I am trying to install it on a raspberry pi 4 with portainer and docker but every time I install it it just exits.

Here are the logs from the container
exec /usr/local/bin/uvicorn: exec format error

@gntouts
Copy link
Owner

gntouts commented Jan 15, 2024

Thanks for pointing that out. This error is expected, since we only publish an amd64 image which is incompatible with the arm64 architecture of the rpi4. One possible solution would be to build the image yourself on the RPI4 and use that instead of gntouts/eltrak:latest.

For a more proper solution, I will build a multi-platform image and update the github actions to build and publish multi-platform images as well, once I get the chance.

@gntouts
Copy link
Owner

gntouts commented Jan 15, 2024

I have built and pushed a multiplatform image. If you try to docker pull gntouts/eltrak:latest, you should be able to start the container.

@alexroumi
Copy link
Author

It pulled the image but for some reason, I'ts crashing. Here are the logs

====== WebDriver manager ======
Current firefox version is 91.10
Get LATEST geckodriver version for 91.10 firefox
There is no [linux64] geckodriver for browser 91.10 in cache
Getting latest mozilla release info for v0.34.0
Trying to download new driver from https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
Driver has been saved in cache [/root/.wdm/drivers/geckodriver/linux64/v0.34.0]
Traceback (most recent call last):
  File "/usr/local/bin/uvicorn", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/uvicorn/main.py", line 435, in main
    run(app, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/uvicorn/main.py", line 461, in run
    server.run()
  File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.9/site-packages/uvicorn/server.py", line 67, in serve
    config.load()
  File "/usr/local/lib/python3.9/site-packages/uvicorn/config.py", line 458, in load
    self.loaded_app = import_from_string(self.app)
  File "/usr/local/lib/python3.9/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/svc/./app.py", line 1, in <module>
    from EltrakLib.TrackerFactory import get_factory, CourierNotSupportedError
  File "/svc/./EltrakLib/TrackerFactory.py", line 1, in <module>
    from EltrakLib.ACS import AcsTracker
  File "/svc/./EltrakLib/ACS.py", line 21, in <module>
    class AcsTracker(CourierTracker):
  File "/svc/./EltrakLib/ACS.py", line 26, in AcsTracker
    driver = setup_driver()
  File "/svc/./EltrakLib/ACS.py", line 18, in setup_driver
    driver = webdriver.Firefox(options=Options, service=Service(GeckoDriverManager().install()))
  File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py", line 176, in __init__
    self.service.start()
  File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 71, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/root/.wdm/drivers/geckodriver/linux64/v0.34.0/geckodriver'

@gntouts
Copy link
Owner

gntouts commented Jan 17, 2024

Yeap, the different CPU architecture seems to be the problem once again. I will need some time to work this out on an arm64 machine.

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

No branches or pull requests

2 participants