Skip to content

Commit

Permalink
fix: ci error, smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iChizer0 authored and LynnL4 committed Feb 1, 2024
1 parent 1603569 commit a36782d
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/functional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ jobs:

steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
54 changes: 36 additions & 18 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,30 @@ jobs:

steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: pip install deps
- name: pip install deps (CPU)
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements/pytorch_cpu.txt
python -m pip install -r requirements/base.txt
python -m pip install -r requirements/inference.txt
python -m pip install -r requirements/export.txt
python -m mim install -r requirements/mmlab.txt
python -m mim install -e .
python --version
python -m pip --version
python -m pip list
python3 -m pip install --upgrade pip wheel setuptools
python3 -m pip install -r requirements/pytorch_cpu.txt
python3 -m pip install -r requirements/base.txt
python3 -m pip install -r requirements/inference.txt
python3 -m pip install -r requirements/export.txt
python3 -m mim install -r requirements/mmlab.txt
python3 -m mim install -e .
python3 --version
python3 -m pip --version
python3 -m pip list
- name: test train deps (CPU)
run: |
python3 tools/train.py --help
conda-installation:
name: conda installation test for (${{ matrix.os }})
Expand All @@ -77,15 +81,29 @@ jobs:

steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: conda install deps (CPU, only base)
- name: conda install deps (CPU)
run: |
conda env create -n edgelab_cpu -f environment.yml
conda run -n edgelab_cpu mim install -r requirements/mmlab.txt
conda run -n edgelab_cpu mim install -e .
conda run -n edgelab_cpu pip3 install -r requirements/inference.txt -r requirements/export.txt -r requirements/tests.txt
- name: conda test train deps (CPU)
run: |
conda env create -n edgelab -f environment.yml
conda run -n edgelab_cpu python3 tools/train.py --help
- name: conda install deps (CUDA, only base)
- name: conda install deps (CUDA)
run: |
conda env create -n edgelab_cuda -f environment_cuda.yml
conda run -n edgelab_cuda mim install -r requirements/mmlab.txt
conda run -n edgelab_cuda mim install -e .
conda run -n edgelab_cuda pip3 install -r requirements/inference.txt -r requirements/export.txt -r requirements/tests.txt
- name: conda test train deps (CUDA)
run: |
conda run -n edgelab_cuda python3 tools/train.py --help
auto-installation:
name: auto installation test for (${{ matrix.os }})
Expand All @@ -99,7 +117,7 @@ jobs:

steps:
- name: checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup deps (shell)
run: |
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements/mmlab.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# use openmim to install
mmcls>=1.0.0.rc6
mmcv<=2.1.0
mmcv-full<=2.1.0
mmdet>=3.0.0, <3.1.0 # mmyolo currently does not support mmdet 3.1.0
mmengine>=0.8.2
mmpose>=1.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/pytorch_cpu.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -i https://download.pytorch.org/whl/cpu
-i https://download.pytorch.org/whl/cpu

torch<=2.0.1
torchaudio<=2.0.2
Expand Down
16 changes: 4 additions & 12 deletions scripts/setup_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,11 @@ if [ "$?" != 0 ]; then
exit 1
fi

eval "$(conda shell.bash hook)" && \
conda activate sscma
if [ "$?" != 0 ]; then
echo -en "Conda active env failed... ${RED}Exiting${RST}\n"
exit 1
fi


# openmim install deps
echo -en "Installing OpenMIM deps... \n"
mim install -r requirements/mmlab.txt && \
mim install -e .
conda run -n sscma mim install -r requirements/mmlab.txt && \
conda run -n sscma mim install -e .
if [ "$?" != 0 ]; then
echo -en "OpenMIM install deps failed... ${RED}Exiting${RST}\n"
exit 1
Expand All @@ -69,8 +62,8 @@ fi

# install optional deps
if [ "${INSTALL_OPTIONAL}" == true ]; then
pip3 install -r requirements/inference.txt -r requirements/export.txt -r requirements/tests.txt
pre-commit install
conda run -n sscma pip3 install -r requirements/inference.txt -r requirements/export.txt -r requirements/tests.txt
conda run -n sscma pre-commit install
fi


Expand All @@ -81,6 +74,5 @@ fi


echo -en "Finished setup... ${GREEN}OK${RST}\n"
conda deactivate

exit 0

0 comments on commit a36782d

Please sign in to comment.