-
Notifications
You must be signed in to change notification settings - Fork 34
/
postBuild
29 lines (22 loc) · 1.1 KB
/
postBuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Post-build script for binder/repo2docker environment setup.
# Log commands
set -ex
# Not sure why we need this here.
pip install -r requirements.txt
# Install additional packages beyond those in requirements.txt so that the
# JupyterLab instance will be able to run all of the NLP library integrations.
pip install -r config/dev_reqs.txt
pip install -r config/jupyter_reqs.txt
# Install large packages during image build for now.
# Later we may want to have the notebooks install these on demand if they
# detect they are running in a Binder environment.
# Note that transformers will start up in a bad state if it detects no PyTorch
# and will stay in that state until Python is restarted.
pip install -r config/big_reqs.txt
# Download the language model needed by Integrate_NLP_Libraries.ipynb
# We can't download this package from within the notebook unless the user
# restarts the kernel after the download.
python -m spacy download en_core_web_sm
# Also download the BERT model used by Model_Training_with_BERT.ipynb so that
# the production environment won't run out of disk space.
python ./binder/download_bert.py