Skip to content

Commit

Permalink
changed install conda->mamba and changed build of micro_sam pip->mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
lufre1 committed Apr 11, 2024
1 parent 1067782 commit 898e09f
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/build_installers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ jobs:
env:
PREPARE_SCRIPT: |
cd deployment
conda install -y -c conda-forge constructor
conda install -y -c conda-forge ruamel.yaml
conda install -y -c conda-forge mamba
mamba env create --file=../environment_cpu.yaml
conda activate sam
cd ../
pip install . --no-deps -v
cd deployment
conda activate base
mamba install -y -c conda-forge constructor
mamba install -y -c conda-forge ruamel.yaml
mamba install -y -c conda-forge mamba
mamba install -y -c conda-forge conda-build
mamba build recipe
# Now we need to create an environment from the package we just built
mamba create -n sam ./output/micro_sam-0.4.1.tar.gz
# mamba env create --file=../environment_cpu.yaml
# conda activate sam
# cd ../
# pip install . --no-deps -v
# cd deployment
# conda activate base
RUN_SCRIPT: |
python version_getter.py
mkdir ./${{ matrix.os }}_x86_64
Expand All @@ -38,6 +42,7 @@ jobs:
with:
ref: ${{ github.ref }}

# chnage this to set-up with mamba
- name: setup conda
if: matrix.os == 'windows-latest' || matrix.os == 'ubuntu-latest'
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -48,6 +53,12 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

- name: Install Mamba
# Install mamba after setting up conda
shell: bash -el {0} # adjust shell as needed for your OS
run: |
conda install -y -c conda-forge mamba
- name: build ${{ matrix.os }}_x86_64
if: matrix.os == 'windows-latest'
shell: pwsh
Expand Down
57 changes: 57 additions & 0 deletions deployment/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{% set version = "0.4.1" %}

package:
name: micro_sam
version: {{ version }}

source:
path: ../../

build:
entry_points:
- micro_sam.annotator = micro_sam.sam_annotator.annotator:main
- micro_sam.annotator_2d = micro_sam.sam_annotator.annotator_2d:main
- micro_sam.annotator_3d = micro_sam.sam_annotator.annotator_3d:main
- micro_sam.annotator_tracking = micro_sam.sam_annotator.annotator_tracking:main
- micro_sam.image_series_annotator = micro_sam.sam_annotator.image_series_annotator:main
- micro_sam.precompute_embeddings = micro_sam.precompute_state:main
noarch: python
number: 1
script: pip install . --no-deps --ignore-installed --no-cache-dir -vvv

requirements:
host:
- python >=3.8
- pip
run:
- kornia
- napari >=0.4.18
- pooch
- pyqt
- python >=3.8
- python-elf >=0.4.8
- pytorch
- segment-anything
- torchvision
- torch_em
- tqdm
- zarr

test:
imports:
- micro_sam
source_files:
- test/**/*.py
commands:
- python -m unittest discover -s test -v

about:
license: MIT
license_file: LICENSE
license_family: MIT
summary: Segment Anything for Microscopy.
home: https://github.com/computational-cell-analytics/micro-sam

extra:
recipe-maintainers:
- constantinpape

0 comments on commit 898e09f

Please sign in to comment.