-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from minrk/conda
use conda
- Loading branch information
Showing
20 changed files
with
129 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ansible-conda"] | ||
path = ansible-conda | ||
url = https://github.com/UDST/ansible-conda.git |
Submodule ansible-conda
added at
724cf4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# {{ ansible_managed }} | ||
|
||
[program:nbgrader_{{nbgrader_course_id}}] | ||
command=nbgrader formgrade | ||
command=/opt/conda/bin/nbgrader formgrade | ||
redirect_stderr=true | ||
stdout_logfile={{nbgrader_log_dir}}/nbgrader_{{nbgrader_course_id}}.log | ||
autostart=true | ||
autorestart=false | ||
stopasgroup=true | ||
user={{nbgrader_owner}} | ||
directory={{nbgrader_base_dir}}/ | ||
environment=HOME="{{home_dir}}/{{nbgrader_owner}}",USER="{{nbgrader_owner}}" | ||
environment=HOME="{{home_dir}}/{{nbgrader_owner}}",USER="{{nbgrader_owner}}",PATH="/opt/conda/bin:%(ENV_PATH)s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash -l | ||
# {{ ansible_managed }} | ||
env | ||
exec jupyterhub $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
|
||
# derived from https://github.com/uchida/ansible-miniconda-role | ||
|
||
- name: miniconda installer is downloaded | ||
get_url: | ||
# disable validate-certs due to Python 2 SSL issues | ||
# we use checksum anyway, so it should be fine | ||
validate_certs: False | ||
url: "https://repo.continuum.io/miniconda/{{conda_installer}}" | ||
dest: "/tmp/{{conda_installer}}" | ||
checksum: "{{conda_checksum}}" | ||
mode: 0755 | ||
|
||
- name: miniconda is installed | ||
shell: | ||
'"/tmp/{{ conda_installer }}" -b -p "{{ conda_prefix }}"' | ||
args: | ||
creates: "{{ conda_prefix }}" | ||
executable: /bin/bash | ||
|
||
- name: add conda to PATH | ||
# add it to the front of bashrc, so it's even on noninteractive paths | ||
lineinfile: | ||
dest: /etc/bash.bashrc | ||
state: present | ||
line: "export PATH={{conda_prefix}}/bin:$PATH" | ||
insertbefore: BOF | ||
|
||
- name: add conda config | ||
copy: | ||
content: "{{ conda_config | to_yaml }}" | ||
dest: "{{ conda_prefix }}/.condarc" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,22 @@ | ||
--- | ||
|
||
- name: pip install | ||
pip: name={{item}} state=present executable=pip3 editable=false | ||
become: true | ||
with_items: | ||
# temporarily install from master until a release is made | ||
# - git+https://github.com/takluyver/terminado.git#egg=terminado | ||
- terminado | ||
|
||
- name: pip install ipython/jupyter deps | ||
pip: name={{item}} state=present executable=pip3 | ||
- name: conda install ipython/jupyter deps | ||
conda: name={{item}} state=present | ||
become: true | ||
with_items: | ||
- pexpect | ||
- nose | ||
- pygments | ||
- Sphinx | ||
- numpydoc | ||
- requests | ||
- jsonpointer | ||
- jsonschema | ||
- mistune | ||
- tornado | ||
- jinja2 | ||
- pyzmq | ||
- notebook==4.2 | ||
- ipyparallel | ||
- ipykernel | ||
- nbconvert | ||
- pandoc | ||
|
||
- name: pip install jupyter | ||
pip: name={{item}} state=present executable=pip3 editable=false | ||
- name: pip install non-conda deps | ||
pip: name={{item}} state=present | ||
become: true | ||
with_items: | ||
- jupyter | ||
- notebook | ||
- ipywidgets | ||
- ipyparallel | ||
- ipywidgets==5 | ||
|
||
- name: install python3 kernelspec | ||
command: python3 -m IPython kernelspec install-self | ||
command: python3 -m IPython kernel install | ||
become: true | ||
ignore_errors: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
|
||
- include: base.yml | ||
- include: python3.yml | ||
- include: conda.yml | ||
- include: jupyter.yml | ||
- include: python3.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,11 @@ | ||
--- | ||
|
||
- name: python3 build dependencies | ||
command: apt-get build-dep -y {{item}} | ||
- name: user conda packages | ||
conda: name={{item}} state=present | ||
become: true | ||
with_items: | ||
- python3 | ||
- python3-numpy | ||
- python3-scipy | ||
- python3-matplotlib | ||
- cython3 | ||
- python3-h5py | ||
with_items: conda_packages | ||
|
||
- name: python3 base | ||
apt: pkg={{item}} state=present update_cache=yes cache_valid_time=3600 | ||
- name: user pip packages | ||
pip: name={{item}} state=present | ||
become: true | ||
with_items: | ||
- python3 | ||
- python3-dev | ||
- python3-pexpect | ||
- python3-h5py | ||
|
||
- name: remove system python3 packages to be managed by pip | ||
apt: pkg={{item}} state=absent | ||
become: true | ||
with_items: | ||
- python3-pip | ||
- ipython3 | ||
- ipython3-notebook | ||
- ipython3-qtconsole | ||
- python3-numpy | ||
- python3-sklearn | ||
- python3-skimage | ||
- python3-scipy | ||
- python3-matplotlib | ||
- python3-pandas | ||
- python3-sympy | ||
- cython3 | ||
- python3-networkx | ||
- python3-nose | ||
- python3-sphinx | ||
- python3-pygments | ||
- python3-tk | ||
|
||
- name: pip3 install script | ||
get_url: dest=/tmp/get_pip.py url=https://bootstrap.pypa.io/get-pip.py | ||
|
||
- name: pip3 | ||
command: python3 /tmp/get_pip.py creates=/usr/local/bin/pip3 | ||
become: yes | ||
|
||
# Splitting the big compiled packages off into seaprate tasks should help | ||
|
||
- name: pip install numpy | ||
pip: name=numpy state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 30 | ||
|
||
- name: pip install scipy | ||
pip: name=scipy state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 30 | ||
|
||
- name: pip install matplotlib | ||
pip: name=matplotlib state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 10 | ||
|
||
- name: pip install cython | ||
pip: name=cython state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 10 | ||
|
||
- name: pip install pandas | ||
pip: name=pandas state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 10 | ||
|
||
- name: pip install other packages | ||
pip: name={{item}} state=present executable=pip3 editable=false | ||
become: true | ||
async: 3600 | ||
poll: 30 | ||
with_items: | ||
- sympy | ||
- scikit-learn | ||
- pillow | ||
- scikit-image | ||
- seaborn | ||
- h5py | ||
- patsy | ||
- ggplot | ||
- statsmodels | ||
- networkx | ||
- ipythonblocks | ||
- plotly | ||
- dask | ||
- blaze | ||
- odo | ||
with_items: pip_packages |
Oops, something went wrong.