Skip to content

Commit

Permalink
fix: skip smoke tests for macos, update setup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr authored Feb 26, 2024
1 parent 97bd6c9 commit cd3399d
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 69 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.8'
Expand Down Expand Up @@ -69,42 +68,6 @@ jobs:
run: |
python3 tools/train.py --help
conda-installation:
name: conda installation test for (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest

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

- 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 run -n edgelab_cpu python3 tools/train.py --help
- 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 }})
runs-on: ${{ matrix.os }}
Expand All @@ -122,3 +85,7 @@ jobs:
- name: setup deps (shell)
run: |
bash scripts/setup_linux.sh
- name: test train (auto)
run: |
conda run -n sscma python3 tools/train.py --help
7 changes: 0 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ name: sscma

channels:
- defaults
- pytorch

dependencies:
- python>=3.8, <= 3.10
- cpuonly>=2.0
- pytorch<=2.0.1
- torchaudio<=2.0.2
- torchvision<=0.15.2
- pip>=23.0.1
- pip:
- -r requirements/base.txt
17 changes: 0 additions & 17 deletions environment_cuda.yml

This file was deleted.

13 changes: 9 additions & 4 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# common
albumentations>=1.3.0
albumentations<=1.3.1
libusb1


# sensor
cbor
numpy>=1.23.5


# vision
opencv-python>=4.7.0.72
opencv-python>=4.9.0.80


# openmmlab package manager
openmim>=0.3.7
Expand All @@ -19,12 +21,15 @@ pyyaml>=6.0
scikit-image>=0.20.0
scikit-learn>=1.2.2


# sound
soundfile>=0.12.1


# visualize
tensorboard>=2.12.3
tqdm>=4.65.0

# data
pyvww

# data
pyvww
2 changes: 1 addition & 1 deletion scripts/setup_colab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else
fi

# limit torch version
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
pip install torch<=2.0.1 torchvision<=0.15.2 torchaudio<=2.0.2

# install base deps
echo -en "Installing base deps... "
Expand Down
22 changes: 19 additions & 3 deletions scripts/setup_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,31 @@ fi

# create conda env and install deps
echo -en "Creating conda env and installing base deps... "
conda env create -n sscma -f environment.yml
if [ "$?" != 0 ]; then
echo -en "Conda create env failed... ${RED}Exiting${RST}\n"
exit 1
fi

# install base deps
echo -en "Installing base deps... \n"
conda run -n sscma pip3 install -r requirements/base.txt
if [ "$?" != 0 ]; then
echo -en "Base deps install failed... ${RED}Exiting${RST}\n"
exit 1
fi

# install pytorch deps
echo -en "Installing pytorch deps... \n"
if [ "${CUDA_AVAILABLE}" ]; then
echo -en "${BLUE}Using CUDA${RST}\n"
conda env create -n sscma -f environment_cuda.yml
conda run -n sscma pip3 install -r requirements/pytorch_cuda.txt
else
echo -en "${BLUE}Using CPU${RST}\n"
conda env create -n sscma -f environment.yml
conda run -n sscma pip3 install -r requirements/pytorch_cpu.txt
fi
if [ "$?" != 0 ]; then
echo -en "Conda create env failed... ${RED}Exiting${RST}\n"
echo -en "Pytorch deps install failed... ${RED}Exiting${RST}\n"
exit 1
fi

Expand Down

0 comments on commit cd3399d

Please sign in to comment.