coco-annotator icon indicating copy to clipboard operation
coco-annotator copied to clipboard

failed to build and run the container

Open naarkhoo opened this issue 2 years ago • 3 comments

I get the following error on annotator_webclient docker

[2021-08-17 21:08:41 +0000] [10] [INFO] Starting gunicorn 19.9.0
[2021-08-17 21:08:41 +0000] [10] [DEBUG] Arbiter booted
[2021-08-17 21:08:41 +0000] [10] [INFO] Listening at: http://0.0.0.0:5000 (10)
[2021-08-17 21:08:41 +0000] [10] [INFO] Using worker: eventlet
[2021-08-17 21:08:41 +0000] [22] [INFO] Booting worker with pid: 22
[2021-08-17 21:08:41 +0000] [10] [DEBUG] 1 workers
[2021-08-17 21:08:43 +0000] [22] [WARNING] MaskRCNN model is disabled.
[2021-08-17 21:08:43 +0000] [22] [WARNING] DEXTR model is disabled.
[2021-08-17 21:08:43 +0000] [22] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 102, in init_process
super(EventletWorker, self).init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
__import__(module)
File "/workspace/webserver/__init__.py", line 63, in <module>
app = create_app()
File "/workspace/webserver/__init__.py", line 40, in create_app
run_watcher()
File "/workspace/webserver/watcher.py", line 62, in run_watcher
observer.start()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 255, in start
emitter.start()
File "/usr/local/lib/python3.6/site-packages/watchdog/utils/__init__.py", line 111, in start
self.on_thread_start()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify.py", line 121, in on_thread_start
self._inotify = InotifyBuffer(path, self.watch.is_recursive)
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
self._inotify = Inotify(path, recursive)
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 176, in __init__
Inotify._raise_error()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
raise OSError(os.strerror(err))
OSError: Function not implemented

I get the same error when I change the rabbitmq to 3.8

[2021-08-17 21:13:51 +0000] [9] [DEBUG] 1 workers
[2021-08-17 21:13:54 +0000] [21] [WARNING] MaskRCNN model is disabled.
[2021-08-17 21:13:54 +0000] [21] [WARNING] DEXTR model is disabled.
[2021-08-17 21:13:54 +0000] [21] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/geventlet.py", line 102, in init_process
super(EventletWorker, self).init_process()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
__import__(module)
File "/workspace/webserver/__init__.py", line 63, in <module>
app = create_app()
File "/workspace/webserver/__init__.py", line 40, in create_app
run_watcher()
File "/workspace/webserver/watcher.py", line 62, in run_watcher
observer.start()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/api.py", line 255, in start
emitter.start()
File "/usr/local/lib/python3.6/site-packages/watchdog/utils/__init__.py", line 111, in start
self.on_thread_start()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify.py", line 121, in on_thread_start
self._inotify = InotifyBuffer(path, self.watch.is_recursive)
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_buffer.py", line 35, in __init__
self._inotify = Inotify(path, recursive)
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 176, in __init__
Inotify._raise_error()
File "/usr/local/lib/python3.6/site-packages/watchdog/observers/inotify_c.py", line 406, in _raise_error
raise OSError(os.strerror(err))
OSError: Function not implemented

I am using Apple M1 and BigSur if that should be an issue

naarkhoo avatar Aug 17 '21 21:08 naarkhoo

Running into exactly same issue on my M1/BigSur

stbdang avatar Aug 24 '21 00:08 stbdang

@naarkhoo @stbdang I traced the code and found it is the watchdog file watcher which would cause the error. Please refer to gorakhargosh/watchdog#838 for detail. In short, there is no easy way to make the file watcher work for M1 for now.

To still run the container, the following workaround works for me. It basically edit the config to disable the watchdog file watcher which would cause the error.

  1. Edit docker-compose.yml to delete true of FILE_WATCHER
      - FILE_WATCHER=
  1. Now you can run the production build with docker-compose up.

Good luck. Please let me know if this helps.

martin0258 avatar Nov 02 '21 21:11 martin0258

@naarkhoo @stbdang I traced the code and found it is the watchdog file watcher which would cause the error. Please refer to gorakhargosh/watchdog#838 for detail. In short, there is no easy way to make the file watcher work for M1 for now.

To still run the container, the following workaround works for me. It basically edit the config to disable the watchdog file watcher which would cause the error.

  1. Edit docker-compose.yml to delete true of FILE_WATCHER
      - FILE_WATCHER=
  1. Now you can run the production build with docker-compose up.

Good luck. Please let me know if this helps.

Thank you. this worked for me!

mzouink avatar Apr 21 '22 05:04 mzouink