diff --git a/.github/workflows/tests-linux.yml b/.github/workflows/tests-linux.yml index 3b60d160..77750fcc 100644 --- a/.github/workflows/tests-linux.yml +++ b/.github/workflows/tests-linux.yml @@ -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: | diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index e3283443..348a044c 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -17,7 +17,7 @@ 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 @@ -25,25 +25,26 @@ jobs: - 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: | diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index a53631b3..f85dca42 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -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} @@ -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} diff --git a/README.md b/README.md index 97fd5a38..01998ad5 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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): ```` @@ -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 ```` @@ -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 ```` @@ -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: @@ -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: diff --git a/requirements/environment_mac.yml b/requirements/environment_mac.yml index ce968ed9..851adc99 100644 --- a/requirements/environment_mac.yml +++ b/requirements/environment_mac.yml @@ -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 @@ -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