From cd3399dda83e60431b3a413a6e4bf588e4fdd5f6 Mon Sep 17 00:00:00 2001 From: nullptr Date: Mon, 26 Feb 2024 06:19:20 +0000 Subject: [PATCH] fix: skip smoke tests for macos, update setup scripts --- .github/workflows/smoke-test.yml | 41 ++++---------------------------- environment.yml | 7 ------ environment_cuda.yml | 17 ------------- requirements/base.txt | 13 ++++++---- scripts/setup_colab.sh | 2 +- scripts/setup_linux.sh | 22 ++++++++++++++--- 6 files changed, 33 insertions(+), 69 deletions(-) delete mode 100644 environment_cuda.yml diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 5e59ade2..50fdbbe9 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -32,7 +32,6 @@ jobs: matrix: os: - ubuntu-latest - - macos-latest - windows-latest python-version: - '3.8' @@ -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 }} @@ -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 diff --git a/environment.yml b/environment.yml index 718ac711..fe7f6ff5 100644 --- a/environment.yml +++ b/environment.yml @@ -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 diff --git a/environment_cuda.yml b/environment_cuda.yml deleted file mode 100644 index a958c45d..00000000 --- a/environment_cuda.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: sscma - -channels: - - defaults - - pytorch - - nvidia - -dependencies: - - cudatoolkit==11.7 # mmcv pre-built wheels currently requires cuda 11.7 - - python>=3.8, <= 3.10 - - pytorch<=2.0.1 - - pytorch-cuda>=11.7 # mmcv pre-built wheels currently requires cuda 11.7 - - torchaudio<=2.0.2 - - torchvision<=0.15.2 - - pip>=23.0.1 - - pip: - - -r requirements/base.txt diff --git a/requirements/base.txt b/requirements/base.txt index 66c012d5..d5528eff 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # common -albumentations>=1.3.0 +albumentations<=1.3.1 libusb1 @@ -7,8 +7,10 @@ libusb1 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 @@ -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 \ No newline at end of file + +# data +pyvww diff --git a/scripts/setup_colab.sh b/scripts/setup_colab.sh index 45fd1f6e..44f4a100 100755 --- a/scripts/setup_colab.sh +++ b/scripts/setup_colab.sh @@ -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... " diff --git a/scripts/setup_linux.sh b/scripts/setup_linux.sh index 1e2cfe78..795c1f72 100755 --- a/scripts/setup_linux.sh +++ b/scripts/setup_linux.sh @@ -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