Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream dependency library version incompatible #2229

Closed
hoangkhoiLE opened this issue Feb 15, 2023 · 7 comments
Closed

upstream dependency library version incompatible #2229

hoangkhoiLE opened this issue Feb 15, 2023 · 7 comments
Assignees
Labels
1.x Issue/PR related to branch 1.x

Comments

@hoangkhoiLE
Copy link

hoangkhoiLE commented Feb 15, 2023

Hello,

I try to run a model poseC3D based on this guide at https://github.com/open-mmlab/mmaction2/tree/1.x/demo

image

I have already follow an instruction of installation https://mmaction2.readthedocs.io/en/1.x/get_started.html
So this is my Dockerfile to follow the instruction

'''

  ARG PYTORCH="1.10.0"
  ARG CUDA="11.3"
  ARG CUDNN="8"
  FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
  
  ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX 8.6"
  ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
  ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
  ARG MMCUDA="113"
  ARG USERNAME=user
  ARG WKDIR=/home/${USERNAME}
  WORKDIR ${WKDIR}
    
  # Avoid Public GPG key error
  # https://github.com/NVIDIA/nvidia-container-toolkit/issues/258
  RUN rm /etc/apt/sources.list.d/cuda.list \
      && rm /etc/apt/sources.list.d/nvidia-ml.list \
      && apt-key del 7fa2af80 \
      && apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \
      && apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
  
  # Install dependencies
  RUN apt-get update && apt-get install -y \
          git ninja-build libglib2.0-0 wget \
          libsm6 libxrender-dev libxext6 ffmpeg \
          sudo \
      && apt-get clean \
      && rm -rf /var/lib/apt/lists/*
  #https://mmaction2.readthedocs.io/en/1.x/get_started.html
  # Install
  RUN pip install mmcv==2.0.0rc1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.10/index.html
  
  # Install MMAction2 
  
  RUN git clone https://github.com/open-mmlab/mmaction2.git /mmaction2
  WORKDIR /mmaction2
  
  RUN git checkout 1.x
  RUN pip install -v -e .

so in your document, 'mmcv>=2.0.0rc1' is recommended but when I try to run

'''

      python demo/demo_skeleton.py demo/demo_skeleton.mp4 demo/demo_skeleton_out.mp4 \
          --config configs/skeleton/posec3d/slowonly_r50_8xb16-u48-240e_ntu60-xsub-keypoint.py \
          --checkpoint https://download.openmmlab.com/mmaction/skeleton/posec3d/slowonly_r50_u48_240e_ntu60_xsub_keypoint/slowonly_r50_u48_240e_ntu60_xsub_keypoint-f3adabf1.pth \
          --det-config demo/demo_configs/faster-rcnn_r50_fpn_2x_coco_infer.py \
          --det-checkpoint http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth \
          --det-score-thr 0.9 \
          --det-cat-id 0 \
          --pose-config demo/demo_configs/td-hm_hrnet-w32_8xb64-210e_coco-256x192_infer.py \
          --pose-checkpoint https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth \
          --label-map tools/data/skeleton/label_map_ntu60.txt

'''
I got this error
image
and when i try different version of mmcv, I got this error:
image

I don't know much how to fix it. Please help me in this case !

Best regard

@hoangkhoiLE hoangkhoiLE changed the title POSEC3D POSEC3D installation - version mmcv Feb 15, 2023
@cir7
Copy link
Collaborator

cir7 commented Feb 15, 2023

@hoangkhoiLE It's looks like that you installed the wrong version of mmdet, which depends on the old version of mmcv. please install mmdet with mim install "mmdet>=3.0.0rc0", or follow the doc.

@hoangkhoiLE
Copy link
Author

@cir7 Thank for your suggest ! Now i get same error but about mmengine
image

image

Can you give me a goodway to install mmengine ? I already just followed the doc with "mim install mmengine", but I can't get a right version of mmengine!

@cir7
Copy link
Collaborator

cir7 commented Feb 15, 2023

@hoangkhoiLE it looks like you installed mmdet <= 3.0.0rc2, which is incompatible with the latest mmengine, please

  1. uninstall mmdet with pip uninstall mmdet
  2. install latest mmdet with mim install "mmdet==3.0.0rc5"

@hoangkhoiLE
Copy link
Author

hoangkhoiLE commented Feb 15, 2023

@cir7 Thank you ! Now I passed the problem of mmdet. And I can load and do inference with model detection.

But I got another problem with model pose estimation. Can you show me the good version of mmpose which is compatible in this case ?
image
I tried by this command "pip install mmpose"
but I got a version non-compatible (mmpose 0.29.0) with this error
image

I tried by command "mim install mmpose". It changes version of mmdet too and get a version non compatible toot
image

Best regard

@cir7 cir7 added the 1.x Issue/PR related to branch 1.x label Feb 15, 2023
@cir7
Copy link
Collaborator

cir7 commented Feb 15, 2023

@hoangkhoiLE
please install branch 1.x of mmpose, with mim install "mmpose>=1.0.0rc0"

@hoangkhoiLE
Copy link
Author

@cir7 It works ! Thank you for your kind help ! Wish all the best for you !!

@cir7 cir7 changed the title POSEC3D installation - version mmcv upstream dependency library version incompatible Feb 16, 2023
@cir7
Copy link
Collaborator

cir7 commented Feb 16, 2023

we provide a instruction to install these upstream dependency in #2233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Issue/PR related to branch 1.x
Projects
None yet
Development

No branches or pull requests

2 participants