Skip to content

Commit

Permalink
Update conda environments and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Dec 20, 2024
1 parent 91dc3f7 commit 86fd304
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
# 3.12 currently not supported due to issues with nifty.
# python-version: ["3.11", "3.12"]
python-version: ["3.11"]
environment-file:
ubuntu-latest: environment_cpu.yaml
macos-latest: environment_cpu.yaml
windows-latest: environment_cpu_win.yaml

steps:
- name: Checkout
Expand All @@ -31,7 +35,7 @@ jobs:
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment_cpu.yaml
environment-file: ${{ matrix.environment-file }}
create-args: >-
python=${{ matrix.python-version }}
Expand Down
8 changes: 2 additions & 6 deletions environment_cpu.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
name: sam
channels:
- pytorch
- conda-forge
dependencies:
- cpuonly
# This pin is necessary because later nifty versions have import errors on windows.
- nifty =1.2.1=*_4
- nifty >=1.2.1
- imagecodecs
- magicgui
- napari >=0.5.0
- natsort
- pip
- pooch
- protobuf <5
- pyqt
- python-xxhash
- python-elf >=0.4.8
- pytorch >=2.4
- pytorch >=2.4 "libtorch=*=cpu*"
- segment-anything
- torchvision
- torch_em >=0.7.0
Expand Down
26 changes: 26 additions & 0 deletions environment_cpu_win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: sam
channels:
- pytorch
- conda-forge
dependencies:
- cpuonly
# This pin is necessary because later nifty versions have import errors on windows.
- nifty =1.2.1=*_4
- imagecodecs
- magicgui
- napari >=0.5.0
- natsort
- pip
- pooch
- protobuf <5
- pyqt
- python-xxhash
- python-elf >=0.4.8
- pytorch >=2.4
- segment-anything
- torchvision
- torch_em >=0.7.0
- tqdm
- timm
- pip:
- git+https://github.com/ChaoningZhang/MobileSAM.git
9 changes: 2 additions & 7 deletions environment_gpu.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: sam
channels:
- pytorch
- nvidia
- conda-forge
dependencies:
- imagecodecs
# This pin is necessary because later nifty versions have import errors on windows.
- nifty =1.2.1=*_4
- nifty >=1.2.1
- magicgui
- napari >=0.5.0
- natsort
- pip
- pooch
- protobuf <5
- pyqt
- python-xxhash
- python-elf >=0.4.8
- pytorch >=2.4
- pytorch-cuda>=11.7 # you may need to update the cuda version to match your system
- pytorch >=2.4 "libtorch=*=cuda*"
- segment-anything
- torchvision
- torch_em >=0.7.0
Expand Down
27 changes: 27 additions & 0 deletions environment_gpu_win.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: sam
channels:
- pytorch
- nvidia
- conda-forge
dependencies:
- imagecodecs
# This pin is necessary because later nifty versions have import errors on windows.
- nifty =1.2.1=*_4
- magicgui
- napari >=0.5.0
- natsort
- pip
- pooch
- protobuf <5
- pyqt
- python-xxhash
- python-elf >=0.4.8
- pytorch >=2.4
- pytorch-cuda>=11.7 # you may need to update the cuda version to match your system
- segment-anything
- torchvision
- torch_em >=0.7.0
- tqdm
- timm
- pip:
- git+https://github.com/ChaoningZhang/MobileSAM.git

0 comments on commit 86fd304

Please sign in to comment.