Skip to content

Commit

Permalink
Add Ray to development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
frreiss committed Apr 9, 2021
1 parent 76b9a53 commit f5da9e0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/dev_reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pytest
pyyaml
transformers>=3.0.0
# SpaCy models aren't stable across point releases
spacy==2.3.2
spacy==3.0.5
sphinx
sphinxcontrib-apidoc
ipywidgets
Expand Down
11 changes: 8 additions & 3 deletions config/jupyter_reqs.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# jupyter_reqs.txt
# Pip requirements file to create a Jupyterlab environment for development of
# this project.
jupyterlab
jupyterlab-git

# We currently install JupyterLab from conda because the pip packages are
# broken for Anaconda environments with Python 3.6 and 3.8 on Mac, as of
# April 2021.
#jupyterlab
#jupyterlab-git
nodejs
xeus-python
ipywidgets
matplotlib

ray

16 changes: 11 additions & 5 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Use environment variables if present.
# (-z predicate means "unset or empty string")
if [ -z "$PYTHON_VERSION" ]; then
PYTHON_VERSION="3.7"
PYTHON_VERSION="3.8"
fi
ENV_NAME="pd"

Expand Down Expand Up @@ -119,6 +119,14 @@ if [ -n "${ENV_NAME}" ]; then
conda activate ${ENV_NAME}
fi

################################################################################
# Install packages with conda

# We currently install JupyterLab from conda because the pip packages are
# broken for Anaconda environments with Python 3.6 and 3.8 on Mac, as of
# April 2021.
conda install -y -c conda-forge jupyterlab
conda install -y -c conda-forge/label/main nodejs

################################################################################
# Install packages with pip
Expand Down Expand Up @@ -148,18 +156,16 @@ fi

# spaCy language models for English
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_trf


# Finish installation of ipywidgets from the "conda-forge" section above
# Finish installation of ipywidgets
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager

# Also install the table of contents extension
jupyter labextension install --no-build @jupyterlab/toc

# Jupyter debugger extension (requires xeus-python, installed above)
jupyter labextension install --no-build @jupyterlab/debugger

# Build once after installing all the extensions, and skip minimization of the
# JuptyerLab resources, since we'll be running from the local machine.
jupyter lab build --minimize=False
Expand Down

0 comments on commit f5da9e0

Please sign in to comment.