Skip to content

[Fix] Update mmcv installation in dockerfile #860

New issue

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

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

Already on GitHub? # to your account

Merged
merged 4 commits into from
Sep 11, 2021

Conversation

Junjun2016
Copy link
Collaborator

@Junjun2016 Junjun2016 commented Sep 8, 2021

Motivation

Update mmcv installation in dockerfile

Modification

RUN pip install mmcv-full==latest+torch1.6.0+cu101 -f https://download.openmmlab.com/mmcv/dist/index.html
-->
RUN pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
No

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #860 (f1056b4) into master (d35fbbd) will increase coverage by 0.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #860      +/-   ##
==========================================
+ Coverage   88.90%   89.02%   +0.12%     
==========================================
  Files         110      111       +1     
  Lines        5928     6043     +115     
  Branches      950      969      +19     
==========================================
+ Hits         5270     5380     +110     
- Misses        465      467       +2     
- Partials      193      196       +3     
Flag Coverage Δ
unittests 89.02% <ø> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmseg/datasets/builder.py 87.01% <0.00%> (-2.47%) ⬇️
mmseg/datasets/dataset_wrappers.py 97.67% <0.00%> (-2.33%) ⬇️
mmseg/core/evaluation/metrics.py 90.42% <0.00%> (-0.20%) ⬇️
mmseg/datasets/custom.py 92.09% <0.00%> (-0.05%) ⬇️
mmseg/models/decode_heads/__init__.py 100.00% <0.00%> (ø)
mmseg/models/decode_heads/isa_head.py 96.00% <0.00%> (ø)
mmseg/datasets/ade.py 93.93% <0.00%> (+3.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d35fbbd...f1056b4. Read the comment docs.

@xvjiarui xvjiarui self-requested a review September 9, 2021 01:39
@@ -1,6 +1,7 @@
ARG PYTORCH="1.6.0"
ARG CUDA="10.1"
ARG CUDNN="7"
ARG MMCV="1.3.12"

FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello.When I try to build docker image
/docker$ docker build -t mmseg .
I get a error
Error log:
Step 10/16 : RUN conda clean --all
---> Using cache
---> 025c6545676b
Step 11/16 : RUN ["/bin/bash", "-c", "pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html"]
---> Running in 24b4e9123299
Looking in links: https://download.openmmlab.com/mmcv/dist/cu/torch/index.html
ERROR: Could not find a version that satisfies the requirement mmcv-full== (from versions: 1.0rc0, 1.0rc2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.3.0, 1.3.1, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11, 1.3.12)
ERROR: No matching distribution found for mmcv-full==
The command '/bin/bash -c pip install mmcv-full==${MMCV} -f https://download.openmmlab.com/mmcv/dist/cu${CUDA//./}/torch${PYTORCH}/index.html' returned a non-zero code: 1

And we can see "Looking in links: https://download.openmmlab.com/mmcv/dist/cu/torch/index.html",script cannt get args ${MMCV},${CUDA//./},${PYTORCH},beacause args workspace.You can see https://yeasy.gitbook.io/docker_practice/image/dockerfile/arg

We can fix dockerfile to resolve problem:

ARG PYTORCH="1.6.0"
ARG CUDA="10.1"
ARG CUDNN="7"

FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel

ARG PYTORCH="1.6.0"
ARG CUDA="10.1"
ARG CUDNN="7"
ARG MMCV="1.3.12"

Junjun2016 and others added 2 commits September 9, 2021 12:47
Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
@Junjun2016
Copy link
Collaborator Author

Hi @VVsssssk
Please test it again.

@Junjun2016 Junjun2016 merged commit 56e18ba into open-mmlab:master Sep 11, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* update dockerfile

* Update docker/Dockerfile

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>

* add ARG

* change dash to bash

Co-authored-by: Jerry Jiarui XU <xvjiarui0826@gmail.com>
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
open-mmlab#860)

[DeviceMap] Make sure stable diffusion can be loaded from older transformers versiosn
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants