sedna icon indicating copy to clipboard operation
sedna copied to clipboard

bug from image "sedna-example-joint-inference-helmet-detection-big:v0.4.3"

Open zz952332446 opened this issue 2 years ago • 9 comments

I am deploying Example1:Using Joint Inference Service in Helmet Detection Scenario.

edge is okay, but the master has a problem: container k8s_big-model_helmet-detection-inference-example-cloud can't up

image

The container k8s_big-model_helmet-detection-inference-example-cloud 's log is as follow:

[2022-03-22 12:44:24,480] base.py(79) [INFO] - Start sedna server over http://10.244.0.10:5000
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/uvicorn/server.py", line 69, in run
    return asyncio.get_event_loop().run_until_complete(self.serve(sockets=sockets))
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

I use image from dockerhub

docker pull kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.4.3

zz952332446 avatar Mar 22 '22 12:03 zz952332446

Hi @zz952332446 . This is a known issue with uvicorn that sedna have investigated. The Ownner has provided fix PR about it in #240 .

JoeyHwong-gk avatar Mar 23 '22 03:03 JoeyHwong-gk

Hi @zz952332446 . This is a known issue with uvicorn that sedna have investigated. The Ownner has provided fix PR about it in #240 .

hello, I have tried uvicorn~=0.14.0, but there is another problem I use build_image.sh to build the image, and then docker run -id to start the container

image

image

zz952332446 avatar Mar 23 '22 07:03 zz952332446

This problem occurs because the path of big model doesn't injected into the container, in your case, pass the variable [MODEL_URL] to the container will be solved. It's recommend that deployment service with k8s, follow here for more details.

JoeyHwong-gk avatar Mar 23 '22 07:03 JoeyHwong-gk

I also encountered the same problem. How did you solve it?

916264367 avatar Mar 23 '22 12:03 916264367

我正在部署 Example1:在头盔检测场景中使用联合推理服务

edge还可以,但是master有个问题:container k8s_big-model_helmet-detection-inference-example-cloudcan't up

图片

容器k8s_big-model_helmet-detection-inference-example-cloud的日志如下:

[2022-03-22 12:44:24,480] base.py(79) [INFO] - Start sedna server over http://10.244.0.10:5000
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/uvicorn/server.py", line 69, in run
    return asyncio.get_event_loop().run_until_complete(self.serve(sockets=sockets))
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

我使用来自 dockerhub 的图像

docker pull kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.4.3

I also encountered the same problem. How did you solve it?

916264367 avatar Mar 23 '22 12:03 916264367

This problem occurs because the path of big model doesn't injected into the container, in your case, pass the variable [MODEL_URL] to the container will be solved. It's recommend that deployment service with k8s, follow here for more details.

thanks! I solved the problem about the image on the cloud , but I meet a new problem on the agent, I have made a new issue about that.

zz952332446 avatar Mar 23 '22 13:03 zz952332446

我正在部署 Example1:在头盔检测场景中使用联合推理服务。 edge还可以,但是master有个问题:container k8s_big-model_helmet-detection-inference-example-cloudcan't up 图片 容器k8s_big-model_helmet-detection-inference-example-cloud的日志如下:

[2022-03-22 12:44:24,480] base.py(79) [INFO] - Start sedna server over http://10.244.0.10:5000
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/uvicorn/server.py", line 69, in run
    return asyncio.get_event_loop().run_until_complete(self.serve(sockets=sockets))
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

我使用来自 dockerhub 的图像

docker pull kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.4.3

I also encountered the same problem. How did you solve it?

lib/requirements.txt最后应该是 uvicorn~=0.14.0,dockerhub上的v0.4.3镜像这里没有改,有问题 我是自己本地通过dockerfile build生成的,再通过k8s部署deployment就不会报错~

zz952332446 avatar Mar 23 '22 13:03 zz952332446

我正在部署Example1: 在头盔检测场景中使用联合推理服务k8s_big-model_helmet-detection-inference-example-cloud 图片k8s_big-model_helmet-detection-inference-example-cloud

[2022-03-22 12:44:24,480] base.py(79) [INFO] - Start sedna server over http://10.244.0.10:5000
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/uvicorn/server.py", line 69, in run
    return asyncio.get_event_loop().run_until_complete(self.serve(sockets=sockets))
  File "/usr/lib/python3.6/asyncio/events.py", line 694, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/lib/python3.6/asyncio/events.py", line 602, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

我使用来自 dockerhub 的图像

docker pull kubeedge/sedna-example-joint-inference-helmet-detection-big:v0.4.3

我也遇到了同样的问题。你是怎么解决的?

lib/requirements.txt最后应该是uvicorn~=0.14.0,dockerhub上的v0.4.3镜像这里没有修改,有问题 我是自己本地通过dockerfile build生成的,再通过k8s部署就不会报部署了~

hello, it's not work. I've fixed uvicon. uvicorn~=0.14.0. image When the video is not playing, the pod is running image But, When I execute ffmpeg -re -i /data/video/video.mp4 -vcodec libx264 -f rtsp rtsp://localhost/video, image I check the logs of the pod: image I don't know why it's the same mistake

916264367 avatar Mar 28 '22 10:03 916264367

uvicon

After pulling the lastest commits, please rerun sedna/examples/build_image.sh to ensure that the local docker image has been replaced.

JoeyHwong-gk avatar Mar 29 '22 03:03 JoeyHwong-gk