Failed to run annotator_webclient on Macbook with processor Apple Silicon [M1 Pro]
I can't run a webclient on a Macbook with an M1 Pro processor. Is there any solution to this problem? Is it possible to run via rosetta?
I'm having this same issue. I believe the issue is with inotify, from my experience in projects at work (which also have inotify issues) there is no way to emulate it with rosetta. I think the only solution is to find a different work around without the inotify dependency. I'm not sure the use case in this software for inotify but it's a show stopper on M1 processors.
EDIT: I would like be proven wrong about this, it would help me at work as well 😅, but I don't think it's the case.
annotator_webclient | Traceback (most recent call last):
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
annotator_webclient | worker.init_process()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 102, in init_process
annotator_webclient | super(EventletWorker, self).init_process()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
annotator_webclient | self.load_wsgi()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
annotator_webclient | self.wsgi = self.app.wsgi()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
annotator_webclient | self.callable = self.load()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
annotator_webclient | return self.load_wsgiapp()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
annotator_webclient | return util.import_app(self.app_uri)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
annotator_webclient | __import__(module)
annotator_webclient | File "/workspace/webserver/__init__.py", line 63, in <module>
annotator_webclient | app = create_app()
annotator_webclient | File "/workspace/webserver/__init__.py", line 40, in create_app
annotator_webclient | run_watcher()
annotator_webclient | File "/workspace/webserver/watcher.py", line 62, in run_watcher
annotator_webclient | observer.start()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 255, in start
annotator_webclient | emitter.start()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/utils/__init__.py", line 111, in start
annotator_webclient | self.on_thread_start()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify.py", line 121, in on_thread_start
annotator_webclient | self._inotify = InotifyBuffer(path, self.watch.is_recursive)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
annotator_webclient | self._inotify = Inotify(path, recursive)
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 176, in __init__
annotator_webclient | Inotify._raise_error()
annotator_webclient | File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
annotator_webclient | raise OSError(os.strerror(err))
annotator_webclient | OSError: Function not implemented
@1krupson turns out this is actually really easy to disable. You need to comment out the following line in the compose file.
(from this)
- FILE_WATCHER=true
(to this)
# - FILE_WATCHER=true
https://github.com/jsbroks/coco-annotator/blob/master/docker-compose.yml#L19
Setting it to false has no effect, it must be commented out, and that will disable the watcher which uses inotify.
Note that in development mode, this flag is overridden. See https://github.com/jsbroks/coco-annotator/blob/master/docker-compose.dev.yml#L38
So you really need to set it to false there.