You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I tried to run demo/image_demo.py in docker container.
But, I could not run demo/image_demo.py. At this time, it occurs the following error.
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Reproduction
What command or script did you run?
git clone https://github.com/open-mmlab/mmsegmentation.git -b v0.24.1
cd mmsegmentation/docker
docker build -t mmsegmentation:0.24.1 .
docker run --runtime=nvidia -it mmsegmentation:0.24.1 bash
And, I run the following command in Docker container.
Did you make any modifications on the code or config? Did you understand what you have modified?
No.
What dataset did you use?
Cityscapes Dataset
Environment
Please run python mmseg/utils/collect_env.py to collect necessary environment information and paste it here.
I runned python mmseg/utils/collect_env.py. But, it occurs the following error.
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
You may add addition that may be helpful for locating the problem, such as
How you installed PyTorch [e.g., pip, conda, source]
Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)
This Dockerfile used pytorch/pytorch:1.11.0-cuda11.3-cudnn8-devel as base image.
Error traceback
# python demo/image_demo.py demo/demo.png configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth --device cuda:0 --palette cityscapes
Traceback (most recent call last):
File "demo/image_demo.py", line 4, in <module>
from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot
File "/mmsegmentation/mmseg/__init__.py", line 4, in <module>
import mmcv
File "/opt/conda/lib/python3.8/site-packages/mmcv/__init__.py", line 4, in <module>
from .fileio import *
File "/opt/conda/lib/python3.8/site-packages/mmcv/fileio/__init__.py", line 2, in <module>
from .file_client import BaseStorageBackend, FileClient
File "/opt/conda/lib/python3.8/site-packages/mmcv/fileio/file_client.py", line 15, in <module>
from mmcv.utils.misc import has_method
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/__init__.py", line 40, in <module>
from .env import collect_env
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/env.py", line 9, in <module>
import cv2
File "/opt/conda/lib/python3.8/site-packages/cv2/__init__.py", line 8, in <module>
from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Bug fix
This Dockerfile need to install libgl1-mesa-dev for demo script.
The text was updated successfully, but these errors were encountered:
Checklist
Yes.
Yes.
mmsegmentation/docker/Dockerfile
Lines 15 to 17 in a87b892
Describe the bug
I tried to run
demo/image_demo.py
in docker container.But, I could not run
demo/image_demo.py
. At this time, it occurs the following error.Reproduction
And, I run the following command in Docker container.
Did you make any modifications on the code or config? Did you understand what you have modified?
No.
What dataset did you use?
Cityscapes Dataset
Environment
python mmseg/utils/collect_env.py
to collect necessary environment information and paste it here.I runned
python mmseg/utils/collect_env.py
. But, it occurs the following error.$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)This Dockerfile used
pytorch/pytorch:1.11.0-cuda11.3-cudnn8-devel
as base image.Error traceback
Bug fix
This Dockerfile need to install
libgl1-mesa-dev
for demo script.The text was updated successfully, but these errors were encountered: