Skip to content

Commit

Permalink
Move deps to environment.yml that were pip installed
Browse files Browse the repository at this point in the history
* for more reproducible development environments, used conda to solve
  all dependencies
* Change submodule installation order - core depends on spec, so
  install spec first

fixup! Move deps to environment.yml that were pip installed

Try strict priority
  • Loading branch information
k-dominik committed Dec 9, 2024
1 parent c4e17fd commit 4d473bc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
auto-activate-base: false
activate-environment: tiktorch-server-env
environment-file: environment.yml
channel-priority: flexible
channel-priority: strict
miniforge-variant: Miniforge3
- name: Get the latest commit hash and target ref
run: |
Expand All @@ -51,7 +51,7 @@ jobs:
auto-activate-base: false
activate-environment: tiktorch-server-env
environment-file: environment.yml
channel-priority: flexible
channel-priority: strict
miniforge-variant: Miniforge3
- name: conda diagnostics
run: |
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
with:
auto-update-conda: true
auto-activate-base: true
channel-priority: flexible
channel-priority: strict
miniforge-variant: Miniforge3
- name: install common conda dependencies
run: conda install -n base -c conda-forge conda-build setuptools_scm -y
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
with:
auto-update-conda: true
auto-activate-base: true
channel-priority: flexible
channel-priority: strict
miniforge-variant: Miniforge3
- name: install common conda dependencies
run: conda install -n base -c conda-forge conda-build setuptools_scm -y
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL=/bin/bash
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TIKTORCH_ENV_NAME ?= tiktorch-server-env
SUBMODULES = ./vendor/core-bioimage-io-python ./vendor/spec-bioimage-io
SUBMODULES = ./vendor/spec-bioimage-io ./vendor/core-bioimage-io-python

protos:
python -m grpc_tools.protoc -I./proto --python_out=tiktorch/proto/ --grpc_python_out=tiktorch/proto/ ./proto/*.proto
Expand Down
27 changes: 21 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: tiktorch-server-env
channels:
- ilastik-forge
- pytorch
- ilastik-forge
- conda-forge
- nodefaults
dependencies:
# - bioimage.spec via submodule
# - bioimage.core via submodule
- python 3.9.*
- numpy
- numpy >=1.21,<2
- grpcio=1.44 # protobuf 5 requires protoc version > 3.19.0 that requires grpcio >= 1.44
- marshmallow-union
- marshmallow=3.12.*
- marshmallow-jsonschema
- protobuf
- pyyaml=5.3.*
- requests
- ruamel.yaml
- scikit-learn
- scipy
- typing-extensions
Expand All @@ -32,17 +32,32 @@ dependencies:
- cpuonly
# - cudatoolkit >=10.2
# - cudnn
# - tochvision
- torchvision

# tensorflow (1.14 is the latest 1.x version on cf)
# so far we don't have any 2.x models in the model zoo
# tensorflow skipped for now, as it conflicts with grpcio version 1.41
# - tensorflow >=2.9,<3.0

# convenient to use bioiamgeio.core tools
- imageio
# bioimageio.spec / bioimageio.core dependencies:
- annotated-types >=0.5.0,<1
- email_validator
- h5py
- imageio >=2.10
- loguru
- packaging >=17.0
- pooch >=1.5,<2
- pydantic >=2.7.0,<2.10
- pydantic-core
- pydantic-settings >=2.5
- python-dateutil
- rich
- ruyaml
- tifffile
- tqdm
- typer
- zipp


# dev stuff
- pytest
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"grpcio>=1.31",
"numpy<2", # pytorch 2.2.2-py3.9_0 for macos is compiled with numpy 1.*
"protobuf",
"pydantic>=2.7.0,<2.10",
"pyyaml",
"xarray",
],
Expand Down

0 comments on commit 4d473bc

Please sign in to comment.