Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting to mamba #436

Merged
merged 30 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
079a240
first attempt at adding micromamba to windows
jamesgwen Aug 15, 2024
b92b153
replace conda info step with mamba info
jamesgwen Aug 15, 2024
e364519
testing changed linux file
jamesgwen Aug 15, 2024
de956c7
fixing mamba command for linux file
jamesgwen Aug 15, 2024
cc5af88
getting rid of redundant job in linux file
jamesgwen Aug 15, 2024
040e1b5
changing reference envi file linux
jamesgwen Aug 15, 2024
e0d33c6
first changes to mac test file
jamesgwen Aug 15, 2024
74b6f28
adjusting environment file for mac
jamesgwen Aug 15, 2024
aa196f0
trying java fix
jamesgwen Aug 15, 2024
330f744
trying pep517 to load python javabridge
jamesgwen Aug 15, 2024
b298226
adjusting setuptools depen
jamesgwen Aug 15, 2024
e37e868
installing bioformats and javabridge sep
jamesgwen Aug 15, 2024
401a284
trying new way to install javabridge
jamesgwen Aug 15, 2024
76d780f
trying adding numpy to pep517 statement
jamesgwen Aug 15, 2024
ba805b3
taking out initial java jobs
jamesgwen Aug 15, 2024
cf00acc
adding 3.9 and .10 to python
jamesgwen Aug 15, 2024
36208e2
trying javabridge instead of python-javabridge
jamesgwen Aug 15, 2024
0c3212c
trying download of python-javabridge from git
jamesgwen Aug 15, 2024
e41ad3e
adding javabridge back to main environment file
jamesgwen Aug 16, 2024
ef32cce
adding new readme
jamesgwen Aug 16, 2024
f153b4e
adjusting sections
jamesgwen Aug 16, 2024
b6c66cb
adjusting links
jamesgwen Aug 16, 2024
e78468c
trying to install numpy first
jamesgwen Aug 16, 2024
783d780
changing order in the environment file
jamesgwen Aug 16, 2024
34d8747
reordering pip statements
jamesgwen Aug 16, 2024
fbaf12c
taking bioformats and javabridge out of main environment file mac
jamesgwen Aug 16, 2024
1859095
trying to install javabridge from github
jamesgwen Aug 16, 2024
4772b46
changing channel for javabridge
jamesgwen Aug 16, 2024
dc0847c
changing which packages are pulled from pip
jamesgwen Aug 16, 2024
42cba7d
adjusting test file macos
jamesgwen Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,35 @@ jobs:
sudo apt-get update
sudo apt-get install openslide-tools
sudo apt-get install pandoc
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
auto-activate-base: false
activate-environment: pathml
micromamba-version: '1.5.6-0'
environment-name: pathml
environment-file: requirements/environment_test.yml
# mamba-version: "*"
miniforge-version: latest
use-mamba: true
channels: conda-forge
python-version: ${{ matrix.python-version }}
init-shell: >-
bash
create-args: >-
python=${{ matrix.python-version }}
- name: Debugging
run: |
echo "Printing the environment.yml file..."
cat requirements/environment_test.yml
echo "Checking the status of mamba..."
mamba --version
echo "Checking the status of micro mamba..."
micromamba config
echo "Checking the available disk space..."
df -h

- name: Install dependencies with mamba
shell: bash -l {0}
run: mamba env update --file requirements/environment_test.yml --name pathml
- name: Conda info
# - name: Install dependencies with micromamba
# shell: bash -l {0}
# run: micromamba env update --file requirements/environment_test.yml --name pathml

- name: Micromamba info
shell: bash -l {0}
run: |
conda info
conda list
micromamba info
micromamba config
micromamba list

- name: Set default Temurin JDK 17
run: |
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,34 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest]
python-version: ["3.8"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2

- name: Install openslide
shell: bash -l {0}
run: brew install openslide


- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: true
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
activate-environment: pathml
micromamba-version: '1.5.6-0'
environment-name: pathml
environment-file: requirements/environment_mac.yml
channels: conda-forge
init-shell: >-
bash
create-args: >-
python=${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Conda Version
- name: Micromamba info
shell: bash -l {0}
run: conda --version
run: |
micromamba info
micromamba config
micromamba list
- name: Set default Temurin JDK 17
run: |
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,18 @@ jobs:
run: echo "JDK_HOME=${JAVA_HOME}" >> $GITHUB_ENV
shell: bash

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
auto-activate-base: false
activate-environment: pathml
micromamba-version: '1.5.6-0'
environment-name: pathml
environment-file: environment.yml
# environment-file: '.github/ci-environments/env-py39.yml'
# environment-file: .github/ci-environments/env-py${{ matrix.python-version == '3.10' && '310' || matrix.python-version == '3.9' && '39' || '38' }}.yml
mamba-version: "*"
python-version: ${{ matrix.python-version }}

# - name: Install JavaBridge and other dependencies
# shell: bash -l {0}
# run: |
# pip install python-javabridge
init-shell: >-
bash
create-args: >-
python=${{ matrix.python-version }}
- name: Run Python script to find JVM path
shell: bash -l {0}
Expand Down Expand Up @@ -91,11 +88,12 @@ jobs:
env:
OPENSLIDE_PATH: ${{ env.OPENSLIDE_PATH }}

- name: Conda info
- name: Mamba info
shell: bash -l {0}
run: |
conda info
conda list
micromamba info
micromamba config
micromamba list
- name: Install PathML
shell: bash -l {0}
Expand Down
43 changes: 34 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,25 @@ View the official [PathML Documentation on readthedocs](https://pathml.readthedo

## 1.1 Prerequisites

We recommend using [Conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html#) for managing your environments.
We recommend using [Micromamba](https://mamba.readthedocs.io/en/latest/index.html) for managing your environments. We provide instructions on how to install PathML via Micromamba below. In addition, we also provide instructions on how to install via [Miniconda](https://docs.conda.io/en/latest/miniconda.html) should you have a license.

#### Installing Conda
#### Installation

If you don't have Conda installed, you can download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html).
If you don't have Miniconda installed, you can download Miniconda [here](https://docs.conda.io/en/latest/miniconda.html).

#### Updating Conda and Using libmamba (Optional)

#### Upating Micromamba

Make sure you have the recent version of Micromamba by using the following command:
```
micromamba update
```

#### Updating Conda and Using libmamba (Optional)

**If you are using Micromamba, you can skip to the next [section](#Platform-Specific-External-Dependencies).**

We recommend that Anaconda/Microconda users complete the following steps to update your Conda version and use `libmamba` to resolve dependency conflicts.

Recent versions of Conda have integrated `libmamba`, a faster dependency solver. To benefit from this improvement, first ensure your Conda is updated:

Expand All @@ -80,7 +92,7 @@ conda config --set solver libmamba

#### Platform-Specific External Dependencies

For installation methods [1)](#2.1-Install-with-pip-(Recommended-for-Users)) and [2)](#2.2-Install-from-Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages.
For installation methods [1)](#2.1-Install-with-Micromamba-and-pip-(Recommended-for-Users)) and [2)](#2.2-Install-from-Source-(Recommended-for-Developers)), you will need to install the following platform-specific packages.

* Linux: Install external dependencies with [Apt](https://ubuntu.com/server/docs/package-management):
````
Expand Down Expand Up @@ -108,7 +120,20 @@ For Windows users, an alternative to using `vcpkg` is to download and use pre-bu

## 1.2 PathML Installation Methods

### 1.2.1 Install with pip (Recommended for Users)
### 1.2.1 Install with Micromamba and pip (Recommended for Users)

#### Create and Activate Micromamba Environment and install openjdk
````
micromamba create -n pathml 'openjdk<=18.0' -c conda-forge python=3.9
micromamba activate pathml
````

#### Install `PathML` from PyPI
````
pip install pathml
````

### 1.2.2 Install with Anaconda and pip

#### Create and Activate Conda Environment
````
Expand All @@ -125,7 +150,7 @@ conda install -c conda-forge 'openjdk<=18.0'
pip install pathml
````

### 1.2.2 Install from Source (Recommended for Developers)
### 1.2.3 Install from Source (Recommended for Developers)

#### Clone repository
````
Expand Down Expand Up @@ -155,7 +180,7 @@ conda activate pathml
pip install -e .
````

### 1.2.3 Use Docker Container
### 1.2.4 Use Docker Container

First, download or build the PathML Docker container:

Expand Down Expand Up @@ -192,7 +217,7 @@ Note that these instructions assume that there are no other processes using port
Please refer to the `Docker run` [documentation](https://docs.docker.com/engine/reference/run/) for further instructions
on accessing the container, e.g. for mounting volumes to access files on a local machine from within the container.

### 1.2.4 Use Google Colab
### 1.2.5 Use Google Colab

To get PathML running in a Colab environment:

Expand Down
5 changes: 4 additions & 1 deletion requirements/environment_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- python<=3.10
- pip==23.3.2
- numpy==1.23.5
- python-javabridge==4.0.3
- scipy<=1.11.4
- scikit-image<=0.22.0
- matplotlib<=3.8.2
Expand All @@ -20,9 +21,11 @@ dependencies:
- coverage==7.3.4
- networkx<=3.2.1
- pip:
# - setuptools==58.2.0
# - numpy==1.23.5
- torch==1.13.1
- python-bioformats==4.0.7
- python-javabridge==4.0.3
# - python-javabridge==4.0.3
- protobuf==3.20.3
- onnx==1.15.0
- onnxruntime==1.16.3
Expand Down
Loading