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

Rename mmcv package name #2235

Merged
merged 4 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .dev_scripts/check_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def check_installation():
"""Check whether mmcv-full has been installed successfully."""
"""Check whether mmcv has been installed successfully."""
np_boxes1 = np.asarray(
[[1.0, 1.0, 3.0, 4.0, 0.5], [2.0, 2.0, 3.0, 4.0, 0.6],
[7.0, 7.0, 8.0, 8.0, 0.4]],
Expand All @@ -18,11 +18,11 @@ def check_installation():
boxes1 = torch.from_numpy(np_boxes1)
boxes2 = torch.from_numpy(np_boxes2)

# test mmcv-full with CPU ops
# test mmcv with CPU ops
box_iou_rotated(boxes1, boxes2)
print('CPU ops were compiled successfully.')

# test mmcv-full with both CPU and CUDA ops
# test mmcv with both CPU and CUDA ops
if torch.cuda.is_available():
boxes1 = boxes1.cuda()
boxes2 = boxes2.cuda()
Expand All @@ -33,9 +33,9 @@ def check_installation():


if __name__ == '__main__':
print('Start checking the installation of mmcv-full ...')
print('Start checking the installation of mmcv ...')
check_installation()
print('mmcv-full has been installed successfully.\n')
print('mmcv has been installed successfully.\n')

env_info_dict = collect_env()
env_info = '\n'.join([(f'{k}: {v}') for k, v in env_info_dict.items()])
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
ssh-add - <<< '${{ secrets.TEST_SSH_KEY }}'
pip install git+ssh://git@github.com/open-mmlab/mmengine.git
- name: Build and install
run: rm -rf .eggs && pip install -e .
run: rm -rf .eggs && MMCV_WITH_OPS=1 pip install -e .
zhouzaida marked this conversation as resolved.
Show resolved Hide resolved
- name: Validate the installation
run: python -c "import mmcv"
- name: Run unittests
Expand Down Expand Up @@ -103,12 +103,12 @@ jobs:
run: pip install psutil
- name: Create sdist and untar
run: |
MMCV_WITH_OPS=1 python setup.py sdist
tar zxvf dist/mmcv-full* -C /tmp
python setup.py sdist
tar zxvf dist/mmcv* -C /tmp
rm -r mmcv
- name: Build and install from sdist
run: |
pushd /tmp/mmcv-full*
pushd /tmp/mmcv*
pip install -e .
popd
- name: Validate the installation
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ jobs:
- name: Upgrade Setuptools
run: pip install setuptools --upgrade
- name: Build MMCV
run: python setup.py sdist
run: |
sed -i "s/os.getenv('MMCV_WITH_OPS', '1')/os.getenv('MMCV_WITH_OPS', '0')/g" setup.py
python setup.py sdist
- name: Publish distribution to PyPI
run: |
pip install twine
Expand All @@ -37,9 +39,7 @@ jobs:
- name: Upgrade Setuptools
run: pip install setuptools --upgrade
- name: Build MMCV with ops
run: |
sed -i "s/os.getenv('MMCV_WITH_OPS', '0')/os.getenv('MMCV_WITH_OPS', '1')/g" setup.py
python setup.py sdist
run: python setup.py sdist
- name: Publish distribution to PyPI
run: |
pip install twine
Expand Down
94 changes: 46 additions & 48 deletions README.md

Large diffs are not rendered by default.

98 changes: 48 additions & 50 deletions README_zh-CN.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docker images

There are two `Dockerfile` files to build docker images, one to build an image with the mmcv-full pre-built package and the other with the mmcv development environment.
There are two `Dockerfile` files to build docker images, one to build an image with the mmcv pre-built package and the other with the mmcv development environment.

```text
.
Expand Down Expand Up @@ -28,7 +28,7 @@ Or build with remote repository
docker build -t mmcv https://github.com/open-mmlab/mmcv.git#master:docker/release
```

The [Dockerfile](release/Dockerfile) installs latest released version of mmcv-full by default, but you can specify mmcv versions to install expected versions.
The [Dockerfile](release/Dockerfile) installs latest released version of mmcv by default, but you can specify mmcv versions to install expected versions.

```bash
docker image build -t mmcv -f docker/release/Dockerfile --build-arg MMCV=1.5.0 .
Expand Down
3 changes: 1 addition & 2 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ RUN apt-get install -y ffmpeg libturbojpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# build mmcv-full from source with develop mode
# build mmcv from source with develop mode
ARG HTTPS_PROXY=""
ENV https_proxy=${HTTPS_PROXY}
ENV FORCE_CUDA="1"
ENV MMCV_WITH_OPS="1"
ARG CUDA_ARCH=""
ENV TORCH_CUDA_ARCH_LIST=${CUDA_ARCH}
RUN git clone https://github.com/open-mmlab/mmcv.git /mmcv
Expand Down
6 changes: 3 additions & 3 deletions docker/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install mmcv-full
ARG MMCV="1.5.1"
RUN pip install openmim && mim install mmcv-full==${MMCV} && python -c 'import mmcv;print(mmcv.__version__)'
# Install mmcv
ARG MMCV="2.0.0rc1"
RUN pip install openmim && mim install mmcv==${MMCV} && python -c 'import mmcv;print(mmcv.__version__)'
Loading