diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a0887beb..bd034554 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,8 @@ jobs: run: | python -m pip install --upgrade pip setuptools pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi + pip install -r requirements-dev.txt + pip install -r requirements-torch.txt - name: Install pylops run: | python -m setuptools_scm diff --git a/.github/workflows/codacy-coverage-reporter.yaml b/.github/workflows/codacy-coverage-reporter.yaml index 0e610bb1..ed90ca30 100644 --- a/.github/workflows/codacy-coverage-reporter.yaml +++ b/.github/workflows/codacy-coverage-reporter.yaml @@ -26,7 +26,8 @@ jobs: run: | python -m pip install --upgrade pip pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi + pip install -r requirements-dev.txt + pip install -r requirements-torch.txt - name: Install pylops run: | pip install . diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 202c29ca..88f7e618 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -19,5 +19,6 @@ sphinx: python: install: - requirements: requirements-doc.txt + - requirements: requirements-torch.txt - method: pip path: . diff --git a/Makefile b/Makefile index 35cf0e1e..14a0a26b 100755 --- a/Makefile +++ b/Makefile @@ -21,7 +21,8 @@ install: dev-install: make pipcheck - $(PIP) install -r requirements-dev.txt && $(PIP) install -e . + $(PIP) install -r requirements-dev.txt &&\ + $(PIP) install -r requirements-torch.txt && $(PIP) install -e . install_conda: conda env create -f environment.yml && conda activate pylops && pip install . diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00db3746..ab636d61 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -61,6 +61,7 @@ jobs: - script: | python -m pip install --upgrade pip setuptools wheel django pip install -r requirements-dev.txt + pip install -r requirements-torch.txt pip install . displayName: 'Install prerequisites and library' @@ -90,6 +91,7 @@ jobs: - script: | python -m pip install --upgrade pip setuptools wheel django pip install -r requirements-dev.txt + pip install -r requirements-torch.txt pip install . displayName: 'Install prerequisites and library' diff --git a/requirements-dev.txt b/requirements-dev.txt index 6ce1fb00..2fca40dd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,5 @@ numpy>=1.21.0 scipy>=1.11.0 ---extra-index-url https://download.pytorch.org/whl/cpu -torch>=1.2.0 jax numba pyfftw diff --git a/requirements-torch.txt b/requirements-torch.txt new file mode 100644 index 00000000..f2c3b105 --- /dev/null +++ b/requirements-torch.txt @@ -0,0 +1,2 @@ +--index-url https://download.pytorch.org/whl/cpu +torch>=1.2.0