Let cb-3 download the spacy model
{% set name = "allennlp" %}
{% set version = "0.7.2" %}
+{% set spacy_model = "en_core_web_sm" %}
+{% set spacy_model_version = "2.0.0" %}
+
package:
name: {{ name|lower }}
version: {{ version }}
source:
+ - folder: {{ name }}
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: c51d32598ed0efb0599c15f463e2fe792e06d843964528b6bca9747b0d31be5c
+ # Spacy Model
+ - folder: {{ spacy_model }}
+ url: https://github.com/explosion/spacy-models/releases/download/{{ spacy_model }}-{{ spacy_model_version }}/{{ spacy_model }}-{{ spacy_model_version }}.tar.gz
+ sha256: 9d9d231d7c9cbad82178b566fdb25768e3d5098af23ce11e03ec4f432f4a2298
+
build:
number: 0
- script: "{{ PYTHON }} -m pip install . --no-deps -vv"
+ script: "{{ PYTHON }} -m pip install ./{{ name }} --no-deps -vv"
skip: True # [not linux or py<36]
requirements:
@@ -57,10 +66,10 @@ requirements:
- pytorch-pretrained-bert ==0.1.2
test:
+ source_files:
+ - {{ spacy_model }}
commands:
- - curl -L https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz -o ./en_core_web_sm-2.0.0.tar.gz
- - tar -xf ./en_core_web_sm-2.0.0.tar.gz
- - python -m spacy link ./en_core_web_sm-2.0.0/en_core_web_sm en_core_web_sm
+ - python -m spacy link {{ spacy_model }}/{{ spacy_model }} {{ spacy_model }}
- allennlp test-install
imports:
- allennlp
@@ -125,7 +134,7 @@ about:
home: https://allennlp.org/
license: Apache-2.0
license_family: APACHE
- license_file: LICENSE
+ license_file: {{ name }}/LICENSE
summary: An open-source NLP research library, built on PyTorch.
description: |
An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art
