error run bash runDocker.sh
Ai-is-light opened this issue · comments
@lbeaucourt Thanks for your excellent repo.
after successful building the realtime-objectdetection docker, I got the following error:
xhost: unable to open display ""
xauth: file /tmp/.docker.xauth does not exist
bash: exec.sh: No such file or directory
xhost: unable to open display ""
Looking forward to any replies.
@Ai-is-light
Any update on this?
Did you able to find any solution for that?
@ishita-openxcell this repo's Dockerfile will help you :
#Set TF object detection available
ENV PYTHONPATH "$PYTHONPATH:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research/slim"
RUN cd /usr/local/lib/python3.5/dist-packages/tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=.
CMD bash exec.sh
Hi @Ai-is-light , @ishita-openxcell
First, sorry to answer so late, so much work here and I didn't find time to check this sandbox project last months.
It sounds like you have already found a solution to your problem. Way to solve the xauth problem could be found in the runDocker.sh file:
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
Where you manually create the xauth file for docker and add your display.
Let me know if you need more help.
Bye
@lbeaucourt would mind giving some advice about run this repo by Mac + XQuartz + docker?
Thx
@ishita-openxcell this repo's Dockerfile will help you :
#Set TF object detection available
ENV PYTHONPATH "$PYTHONPATH:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research/slim"
RUN cd /usr/local/lib/python3.5/dist-packages/tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=.CMD bash exec.sh
Would you please show more info about how to fix it? I found the above code in Dockerfile, but how can it help? Thank you in advance.
Hi @Ai-is-light , @ishita-openxcell
First, sorry to answer so late, so much work here and I didn't find time to check this sandbox project last months.
It sounds like you have already found a solution to your problem. Way to solve the xauth problem could be found in the runDocker.sh file:
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -Where you manually create the xauth file for docker and add your display.
Let me know if you need more help.
Bye
It also stopped me from going on. Any suggestion is welcome...
Hi @Ai-is-light , @ishita-openxcell
First, sorry to answer so late, so much work here and I didn't find time to check this sandbox project last months.
It sounds like you have already found a solution to your problem. Way to solve the xauth problem could be found in the runDocker.sh file:
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -Where you manually create the xauth file for docker and add your display.
Let me know if you need more help.
Bye
@lbeaucourt
How about this
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
Hello @adamwuyu ,
Can you give more context please? Did you build the docker images using provided Dockerfile? What is your OS and its version?
@DanishAbsar
It's work fine for me without the touch command, but if it's works it's fine! :) Thanks!
Regards
X Error: BadAccess (attempt to access private resource denied) 10 Extension: 130 (MIT-SHM) Minor opcode: 1 (X_ShmAttach) Resource id: 0x12f
@lbeaucourt Please help me to solve this error.
I have followed all the steps. It opens frame window but it's blank and above error displayed in terminal.
Hi YagnikThanki,
Looks as a root access error. Try to run: "sudo bash runDocker.sh".
Regards
@lbeaucourt Thanks for such a quick response.
I have found issue need to set environment variable to force output from QT.
Great! Can you please share the solution which solve the problem with some context if someone have the same bug latter? :)
Qt can be a bit buggy in rendering interfaces when used in this way. If you get an error like this:
X Error: BadAccess (attempt to access private resource denied) 10 Extension: 130 (MIT-SHM) Minor opcode: 1 (X_ShmAttach) Resource id: 0x3800003
You may need to include
--env="QT_X11_NO_MITSHM=1"
in docker run commad in runDocker.sh file.
Hello, how to solve following error?
bash: exec.sh: No such file or directory
@pankajkumbhar Please try to run commnad using bash.
sudo bash runDocker.sh
@YagnikThanki Thank You for such a quick response.
the solution worked but after running it I got another error as follows:
raceback (most recent call last):
File "my-object-detection.py", line 2, in
from function.realtime import *
File "/lab/function/realtime.py", line 3, in
from utils.objDet_utils import *
File "/lab/utils/objDet_utils.py", line 18, in
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/models/research/object_detection/utils/label_map_util.py", line 138, in load_labelmap
with tf.gfile.GFile(path, 'r') as fid:
AttributeError: module 'tensorflow' has no attribute 'gfile'
non-network local connections being removed from access control list
how to solve this one?
@pankajkumbhar I think it's version mismatch error. It's not related to this subject. ping me on my email.
@YagnikThanki I have the same mismatch error than @YagnikThanki . Could you help me please? Thank you so much in advance.
Error
Traceback (most recent call last):
File "my-object-detection.py", line 2, in
from function.realtime import *
File "/lab/function/realtime.py", line 3, in
from utils.objDet_utils import *
File "/lab/utils/objDet_utils.py", line 18, in
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/models/research/object_detection/utils/label_map_util.py", line 138, in load_labelmap
with tf.gfile.GFile(path, 'r') as fid:
AttributeError: module 'tensorflow' has no attribute 'gfile'
non-network local connections being removed from access control list
@rmbadl I think you should use the TensorFlow version 1.x.x version instead of 2.0.0.
the issue #22 force tensorflow to 1.15
For root problem it is more a problem of docker.
Current system user must be member of docker group in order to run docker service without root privilege. See detail here :
https://docs.docker.com/install/linux/linux-postinstall/
My error is a bit different to above. I start the container without --rm
and leave it just stopped and not removed. After computer shutdown, I can no longer get access to the container (its started) with docker exec -it <name> bash
, an error saying that the /tmp/.docker.xauth can not be found, which I double checked in tmp and its gone after reboot..
Hello @TZECHIN6, It's normal that files in /tmp/ have gone after reboot. If you want to relauch it, you need to execute the first line in runDocker.sh :
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
You may also adapt the runDocker.sh to fit your usecase by replacing the docker run by your docker exec command.
Hopes it helps.