diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index 363e3085e1..b84b9b92e5 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -1,22 +1,24 @@ channels: - defaults + - conda-forge dependencies: - flake8>=3.7.9 - codecov - pip + - nltk + - requests + - pytest + - pytest-cov + - sacremoses + - spacy>=3.0 + - sphinx + - tqdm + - certifi + - future + - expecttest - pip: - - dataclasses - - nltk - - requests - revtok - - pytest - - pytest-cov - pytest-pythonpath - - sacremoses - - spacy - - sphinx - sphinx-rtd-theme - - tqdm - - expecttest - https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-3.0.0/de_core_news_sm-3.0.0.tar.gz#egg=de_core_news_sm==3.0.0 - https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz#egg=en_core_web_sm==3.0.0 diff --git a/.circleci/unittest/windows/scripts/environment.yml b/.circleci/unittest/windows/scripts/environment.yml index dc9889b588..b84b9b92e5 100644 --- a/.circleci/unittest/windows/scripts/environment.yml +++ b/.circleci/unittest/windows/scripts/environment.yml @@ -1,24 +1,24 @@ channels: - defaults + - conda-forge dependencies: - flake8>=3.7.9 - codecov - pip + - nltk + - requests + - pytest + - pytest-cov + - sacremoses + - spacy>=3.0 + - sphinx + - tqdm + - certifi + - future + - expecttest - pip: - - dataclasses - - nltk - - requests - revtok - - pytest - - pytest-cov - pytest-pythonpath - - sacremoses - - spacy - - sphinx - sphinx-rtd-theme - - tqdm - - certifi - - future - - expecttest - https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-3.0.0/de_core_news_sm-3.0.0.tar.gz#egg=de_core_news_sm==3.0.0 - https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz#egg=en_core_web_sm==3.0.0 diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 8f1e24f1da..1d0f8af979 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -197,9 +197,10 @@ setup_conda_pytorch_constraint() { # Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT setup_conda_cudatoolkit_constraint() { - export CONDA_CPUONLY_FEATURE="" + export CONDA_BUILD_VARIANT="cuda" if [[ "$(uname)" == Darwin ]]; then export CONDA_CUDATOOLKIT_CONSTRAINT="" + export CONDA_BUILD_VARIANT="cpu" else case "$CU_VERSION" in cu100) @@ -210,7 +211,7 @@ setup_conda_cudatoolkit_constraint() { ;; cpu) export CONDA_CUDATOOLKIT_CONSTRAINT="" - export CONDA_CPUONLY_FEATURE="- cpuonly" + export CONDA_BUILD_VARIANT="cpu" ;; *) echo "Unrecognized CU_VERSION=$CU_VERSION" diff --git a/packaging/torchtext/meta.yaml b/packaging/torchtext/meta.yaml index 36008e5cf5..dec7eb21e3 100644 --- a/packaging/torchtext/meta.yaml +++ b/packaging/torchtext/meta.yaml @@ -1,3 +1,4 @@ +{% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %} package: name: torchtext version: "{{ environ.get('BUILD_VERSION') }}" @@ -14,15 +15,23 @@ requirements: host: - python - setuptools - - cpuonly {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} run: - python - requests - tqdm + - pytorch-mutex 1.0 {{ build_variant }} # [not osx ] {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} + {% if build_variant == 'cpu' %} + run_constrained: + - cpuonly + {% elif not osx %} + run_constrained: + - cpuonly <0 + {% endif %} + build: string: py{{py}} script_env: @@ -40,7 +49,6 @@ test: requires: - pytest - - cpuonly about: home: https://github.com/pytorch/text