From c85e516d52fd23205e0727dd2cd11d3817360d06 Mon Sep 17 00:00:00 2001 From: jannisborn Date: Thu, 7 Mar 2024 16:59:21 +0100 Subject: [PATCH 1/6] doc: split macos and linux cpu installation --- conda.yml => conda_cpu_linux.yml | 0 conda_cpu_mac.yml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) rename conda.yml => conda_cpu_linux.yml (100%) create mode 100644 conda_cpu_mac.yml diff --git a/conda.yml b/conda_cpu_linux.yml similarity index 100% rename from conda.yml rename to conda_cpu_linux.yml diff --git a/conda_cpu_mac.yml b/conda_cpu_mac.yml new file mode 100644 index 000000000..e1fcb522a --- /dev/null +++ b/conda_cpu_mac.yml @@ -0,0 +1,18 @@ +name: gt4sd +channels: + - https://conda.anaconda.org/pytorch + - https://conda.anaconda.org/nvidia + - https://conda.anaconda.org/pyg + - https://conda.anaconda.org/conda-forge +dependencies: + - python>=3.7,<3.9 + - pip>=19.1,<20.3 + - pytorch>=1.0,<=1.12.1 + - cpuonly + - pytorch-scatter<=2.0.9 + - pip: + - -r requirements.txt + - -r cpu_requirements.txt + - -r vcs_requirements.txt + # development + - -r dev_requirements.txt From e681f8c6342c001b8a3414ba326733b90e33df23 Mon Sep 17 00:00:00 2001 From: jannisborn Date: Thu, 7 Mar 2024 17:02:12 +0100 Subject: [PATCH 2/6] doc: update --- .github/workflows/docs.yaml | 2 +- .github/workflows/tests.yaml | 10 +++++----- CONTRIBUTING.md | 2 +- README.md | 10 ++++------ docs/source/gt4sd_inference_usage_md.md | 4 ++-- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 7213a7b8c..ca3c427f5 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -19,7 +19,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: activate-environment: gt4sd - environment-file: conda.yml + environment-file: conda_cpu_linux.yml auto-activate-base: false use-only-tar-bz2: true - name: Build docs diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 02c0f580a..35a7dd7e7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -24,7 +24,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: activate-environment: gt4sd - environment-file: conda.yml + environment-file: conda_cpu_linux.yml auto-activate-base: false use-only-tar-bz2: true - name: Install gt4sd from source @@ -37,10 +37,10 @@ jobs: python -m black src/gt4sd --check --diff --color - name: Remove unnecessary files (see https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image) run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Check flake8 run: | conda activate gt4sd diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a4610c9af..512eebe15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ If you would like to contribute to the package, we recommend the following devel 5. Create and activate a dedicated conda environment: ```sh - conda env create -f conda.yml + conda env create -f conda_cpu_mac.yml conda activate gt4sd ``` diff --git a/README.md b/README.md index 6cc548715..7be613f0e 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ The recommended way to install the `gt4sd` is to create a dedicated conda enviro ```sh git clone https://github.com/GT4SD/gt4sd-core.git cd gt4sd-core/ -conda env create -f conda.yml +conda env create -f conda_cpu_mac.yml # for linux use conda_cpu_linux.yml conda activate gt4sd pip install gt4sd ``` -**NOTE 1:** By default `gt4sd` is installed with CPU requirements. For GPU usage replace `conda env create -f conda.yml` with: +**NOTE 1:** By default `gt4sd` is installed with CPU requirements. For GPU usage replace with: ```sh conda env create -f conda_gpu.yml ``` @@ -59,12 +59,10 @@ A few VCS dependencies require Git LFS (make sure it's available on your system) ### Development setup & installation -If you would like to contribute to the package, we recommend the following development setup: +If you would like to contribute to the package, we recommend to install gt4sd in +editable mode inside your `conda` environment: ```sh -conda env create -f conda.yml -conda activate gt4sd -# install gt4sd in editable mode pip install --no-deps -e . ``` diff --git a/docs/source/gt4sd_inference_usage_md.md b/docs/source/gt4sd_inference_usage_md.md index c0f6651f3..a50a31ca8 100644 --- a/docs/source/gt4sd_inference_usage_md.md +++ b/docs/source/gt4sd_inference_usage_md.md @@ -17,11 +17,11 @@ This notebook show the basic usage of the GT4SD algorithms. ### A note on the setup -In the following we assume that the toolkit has been setup using the provided `conda.yml` as follows: +In the following we assume that the toolkit has been setup using your preferred `conda` `yml` file as follows: ```{code-block} sh # create and activate environment -conda env create -f conda.yml +conda env create -f conda_cpu_mac.yml # or conda_cpu_linux.yml or conda_gpu.yml conda activate gt4sd # install the toolkit pip install . From ef4ab2beec6b42e3123b23c3dcafe17c37ae092d Mon Sep 17 00:00:00 2001 From: jannisborn Date: Fri, 8 Mar 2024 09:14:27 +0100 Subject: [PATCH 3/6] ci: ident removal --- .github/workflows/tests.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 35a7dd7e7..21fcbf262 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,10 +37,10 @@ jobs: python -m black src/gt4sd --check --diff --color - name: Remove unnecessary files (see https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image) run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Check flake8 run: | conda activate gt4sd From e3d16c0b537fe9b8f46daea14e6cbcf1c491186a Mon Sep 17 00:00:00 2001 From: Jannis Born Date: Fri, 8 Mar 2024 09:42:00 +0100 Subject: [PATCH 4/6] Update CONTRIBUTING.md Co-authored-by: Matteo Manica --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 512eebe15..27bf55b90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ If you would like to contribute to the package, we recommend the following devel 5. Create and activate a dedicated conda environment: ```sh - conda env create -f conda_cpu_mac.yml + conda env create -f conda_cpu_mac.yml # for linux use conda_cpu_linux.yml conda activate gt4sd ``` From d7e754c0481cc0799468fe633cdc3921eebc66ad Mon Sep 17 00:00:00 2001 From: Jannis Born Date: Fri, 8 Mar 2024 09:42:18 +0100 Subject: [PATCH 5/6] Update README.md Co-authored-by: Matteo Manica --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7be613f0e..579d6a9ee 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ pip install gt4sd ``` **NOTE 1:** By default `gt4sd` is installed with CPU requirements. For GPU usage replace with: + ```sh conda env create -f conda_gpu.yml ``` From 5c6b2c17722a975e580a5de3e709d2e6041f7abe Mon Sep 17 00:00:00 2001 From: Jannis Born Date: Fri, 8 Mar 2024 09:42:24 +0100 Subject: [PATCH 6/6] Update docs/source/gt4sd_inference_usage_md.md Co-authored-by: Matteo Manica --- docs/source/gt4sd_inference_usage_md.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/gt4sd_inference_usage_md.md b/docs/source/gt4sd_inference_usage_md.md index a50a31ca8..2b38bef69 100644 --- a/docs/source/gt4sd_inference_usage_md.md +++ b/docs/source/gt4sd_inference_usage_md.md @@ -17,7 +17,7 @@ This notebook show the basic usage of the GT4SD algorithms. ### A note on the setup -In the following we assume that the toolkit has been setup using your preferred `conda` `yml` file as follows: +In the following we assume that the toolkit has been setup using your preferred environment file (`conda*.yml`): ```{code-block} sh # create and activate environment