Git Product home page Git Product logo

binder's Introduction

MalariaGEN binder

This repository contains installation scripts and environment definitions for conda and texlive, for standardising environments across the MalariaGEN resource centre team.

Usage

This repo is intended to be used as a git submodule within another repo. This typically involves three distinct steps:

  • Add the malariagen/binder repo as a submodule to your repo. This only needs to be done once per repo. Note that someone else might already have done this for your repo of interest (the repo will include a binder sub-directory if that is the case).

  • Run the install script for each local clone of the repo. This needs to be done for each local clone you have, for example you might need to do this separately for one clone on your local machine and a second clone on a server.

  • Update the binder submodule. This needs to be done every time you know there have been changes made to the binder repo, and you want to move the submodule forward within your working repo.

The following sub-sections give commands for each of the above.

Add binder as a submodule

It is recommended that you first create an issue for doing this within your repo with a title such as "Add binder". Then create a new branch, add binder submodule, and create a pull request. It is also recommend that you add 'deps' to the .gitignore file for the repo, so that once the install command has been run (see next section), the deps directory this is installed into will not come under git tracking. For example, to use this within the malariagen/vector-ops repo, assuming your new issue is number 10:

cd /path/to/local/clone/of/vector-ops
git checkout -b 10_add_binder
git push -u origin 10_add_binder
git submodule add [email protected]:malariagen/binder.git
git add --all
git commit -m 'add binder submodule'
git push

At this point create a pull request for your new branch, and then pull the changes into master, deleting the new branch.

Run install script for a local clone

If you don't already have a local clone of the repo, create one. Note you need to use --recursive in order to pull in binder code. Example code for vector-ops repo:

git clone --recursive [email protected]:malariagen/vector-ops.git

To run the conda installation script, do:

cd /path/to/local/clone/of/vector-ops
./binder/install-conda.sh

Once conda is installed, you can activate the environment with:

source binder/env.sh

Once activated, you can run a jupyter notebook on a local machine with:

jupyter notebook

Or if you want to run a jupyter notebook on a server that you will connect to from your local machine, you could run a command such as:

jupyter notebook --no-browser --ip=0.0.0.0 --port <port number>

Updating the binder submodule

If you know there have been changes made to the binder repo, and you want to move the submodule forward within your working repo (e.g., vector-ops), do:

cd /path/to/local/clone/of/vector-ops
git checkout -b update-binder
cd binder
git fetch
git checkout v2.1.0
cd ..
git add binder
git commit -m 'update binder submodule'
git push -u origin update-binder 

This will create a branch called 'update-binder' with the binder submodule moved forward to the "v2.1.0" tag. You can then get that into master via a PR.

Once merged, don't forget to update your conda environment on all machines, e.g.:

cd /path/to/local/clone/of/vector-ops
./binder/install-conda.sh

Proposing changes

If you want to propose changes to this repository, e.g., add or update a package, please submit a pull request. The following commands show a typical workflow for doing this.

If you don't already have a local clone of the binder repo, fork the repo to your user account, then clone:

git clone [email protected]:yourusername/binder.git

Update your local master branch:

cd /path/to/local/clone/of/binder
git checkout master
git pull

Create a new issue at https://github.com/malariagen/binder/issues describing the changes you propose to make.

Create a new branch for the work you want to do, naming the branch using the issue number and a descriptive slug, e.g.:

git checkout -b 10-add-foo-package
git push -u origin 10-add-foo-package

Make changes to requirements-conda.txt or requirements-pypi.txt in a text editor.

Delete the pinned environment files:

rm -v environment-pinned-*.yml

Commit the changes:

git add --all
git commit -m 'add foo package, wipe pinned environments'
git push

Come back here to https://github.com/malariagen/binder and make a pull request.

After the PR is created, GitHub actions will automatically run to check that the modified environment can be created, and will generate new versions of the pinned environment files. If CI passes, go to the actions, find and download the artifacts (which will contain new pinned environment files), then add them back in to your clone of the binder repo, and push to update the PR.

git add environment-pinned-ubuntu-latest.yml environment-pinned-macos-latest.yml
git commit -m 'add new pinned environment files from CI'
git push

GitHub actions will then run again to verify the pinned environment files can be used to create environments. If CI then passes, the pull request will be merged.

binder's People

Contributors

ahernank avatar alimanfoo avatar amakunin avatar leehart avatar roamato avatar slejdops avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binder's Issues

binder install needs gcc

On a fresh ubuntu install (18.04.4 LTS), binder install fails due to lack of gcc.

Installing gcc fixed the problem, but it might be good to add this requirement to the documentation.

Add umap-learn

@alimanfoo mentioned that might be worthwhile

Simply running

conda install -c conda-forge umap-learn

from within binder env results in a bunch of version conflicts. Is there a better way around it?

Issue installing

Having problems installing the environment on the cluster.

sean@india:~/vector-ops$ ./binder/install-conda.sh
[binder] skipping miniconda installation
[binder] installing packages
[binder] install conda
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.7.11
  latest version: 4.7.12

Please update conda by running

    $ conda update -n base conda



# All requested packages already installed.

conda 4.7.11
[binder] check channel priority - this must be 'true' or 'flexible', ***not*** 'strict'
channel_priority: flexible
[binder] creating environment vector-ops-3d37be2 from /home/sean/vector-ops/binder/environment-pinned-linux.yml
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Traceback (most recent call last):
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1062, in __call__
    return func(*args, **kwargs)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/cli/main.py", line 73, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 101, in execute
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/installers/conda.py", line 27, in install
    unlink_link_transaction = solver.solve_for_transaction(prune=getattr(args, 'prune', False))
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 116, in solve_for_transaction
    should_retry_solve)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 157, in solve_for_diff
    force_remove, should_retry_solve)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 274, in solve_final_state
    ssc = self._add_specs(ssc)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 554, in _add_specs
    explicit_pool = ssc.r._get_package_pool(self.specs_to_add)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 520, in _get_package_pool
    pool = self.get_reduced_index(specs)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 541, in get_reduced_index
    explicit_specs, features = self.verify_specs(explicit_specs)
  File "/home/sean/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 280, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound: 
  - ipython==7.9.0=py36h5ca1d4c_0

sean@india:~/vector-ops$ 

Path is

sean@india:~/vector-ops$ echo @$PATH
@/home/sean/bin:/home/sean/.local/bin:/home/sean/bin:/home/sean/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin
sean@india:~/vector-ops$ 

numpy error after updating conda

Steps to reproduce:

Having existing binder installation on Mac OS, do

./binder/install-conda.sh
source binder/env.sh
python
>>> import numpy

Result:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/am60/malaria/vector-ops/binder/deps/conda/envs/vector-ops/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/Users/am60/malaria/vector-ops/binder/deps/conda/envs/vector-ops/lib/python3.6/site-packages/numpy/core/__init__.py", line 67, in <module>
    raise ImportError(msg.format(path))
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['/Users/am60/malaria/vector-ops/binder/deps/conda/envs/vector-ops/lib/python3.6/site-packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.

Now trying to reinstall binder from scratch by removing binder/deps

UPD binder reinstall from scratch solved this problem

broken samtools in MacOS

In MacOS, samtools cannot be run due to an error:

$ samtools
dyld: Symbol not found: _stdscr
  Referenced from: /Users/am60/malaria/malariagen/binder/conda/envs/vector-ops/bin/samtools
  Expected in: /Users/am60/malaria/malariagen/binder/conda/envs/vector-ops/bin/../lib/libncursesw.6.dylib
 in /Users/am60/malaria/malariagen/binder/conda/envs/vector-ops/bin/samtools
Abort trap: 6

After some googling it seems that this can be fixed by installing ncurses from conda forge by adding
- conda-forge::ncurses to environment.yml

pip version of pysam 0.15.1 seemingly not supported in Mac OS

In Mac OS, error occurs when running pypi installation of pysam

htslib/cram/cram_io.c:63:10: fatal error: 'os/lzma_stub.h' file not found
      #include "os/lzma_stub.h"
               ^~~~~~~~~~~~~~~~
      1 error generated.
      error: command 'clang' failed with exit status 1

Issue in pysam pysam-developers/pysam#645 does not give much options apart from using pysam 0.13.

Is it possible that the same error causes installation of pysam 0.13 instead of 0.15.1 via conda? (this is how I understand the reason we use pypi instead of conda for pysam installation)

Related to #10

mac conda install errors

I got the following errors while running install-conda.sh on a mac

$ ./binder/install-conda.sh
bash: Miniconda3-latest-MaxOSX-x86_64.sh: No such file or directory

One hacky way to resolve this is by modifying the script:

if [ "$(uname)" == "Darwin" ]; then
....
    chmod ug+x Miniconda3-latest-MacOSX-x86_64.sh
    # install miniconda
   ./Miniconda3-latest-MacOSX-x86_64.sh -b -p ../$CONDADIR

Pandas package not found

The install-conda.sh script is failing for me [version c668a73], reporting:

conda.exceptions.ResolvePackageNotFound: 
  - pandas==0.25.0=py36hb3f55d8_0

which appears to be set in environment-pinned-linux.yml.

Have I forgotten a step?

ModuleNotFoundError: No module named 'ipytree'

Ref. https://github.com/malariagen/vector-ops/pull/1139

Non-critical glitch using Zarr tree() in MalariaGEN Datalab notebooks. The tree actually outputs/prints OK, but complains No module named 'ipytree'. Maybe something missing somewhere? Screenshots of the error below.

image

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj)
    916             method = get_real_method(obj, self.print_method)
    917             if method is not None:
--> 918                 method()
    919                 return True
    920 

/opt/conda/lib/python3.7/site-packages/zarr/util.py in _ipython_display_(self)
    492 
    493     def _ipython_display_(self):
--> 494         tree = tree_widget(self.group, expand=self.expand, level=self.level)
    495         tree._ipython_display_()
    496         return tree

/opt/conda/lib/python3.7/site-packages/zarr/util.py in tree_widget(group, expand, level)
    429 
    430 def tree_widget(group, expand, level):
--> 431     import ipytree
    432 
    433     result = ipytree.Tree()

ModuleNotFoundError: No module named 'ipytree'

image

pip warning during install-conda

Says:

Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies. Conda may not use the correct pip to install your packages, and they may end up in the wrong place. Please add an explicit pip dependency. I'm adding one for you, but still nagging you.

Conda install script doesn't work on Mac

The script install-conda.sh doesn't work on Mac, where wget is not installed by default. The offending line is:

 wget --no-clobber https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

wget should be replaced with macOX-native curl. The following should have equivalent behaviour:

curl -C - -O https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

Request: new snakemake version

Hi, can we include snakemake>=5.10.0 in the next binder release?

It introduces integration with jupyter notebooks, which basically means no need to convert code into plain python scripts after development in jupyter. I wanted to play around with this feature, but was carried away by other projects. Thus, leaving a reminder here.

Newer snakemake version

Hi @alimanfoo @hardingnj

Just realized I was using a newer version of snakemake for my workflows. The newest version is
snakemake=5.3.1, which seemingly has CWL export option. But feature that I used (directory output type) was added in snakemake=5.2.0. Can we update the environment.yml:L51 to either of those?

As a side-effect it might be needed to introduce a couple of changes in the pipelines, as the directory usage is not backwards compatible, i.e. mandatory in newer versions and cannot be used in older versions.

Here's the line:

- snakemake=4.8.0

owslib problem: fix found

Doing v4.2.1 installation I encountered an error

conda.exceptions.ResolvePackageNotFound: 
  - owslib==0.19.0=py_1

It seems to happen because this package is labelled broken in conda-forge

Solution that worked for me: replace an entry in pinned environment to

  - owslib=0.19.0=py_2

Add MacOS CI

Don't know how easy, but would be cool to add in MacOS CI to check everything installs on all platforms.

pysamstats import error

After creating an environment using binder as a submodule, I'm finding I can't import pysamstats:

$ python
Python 3.6.7 | packaged by conda-forge | (default, Nov 21 2018, 02:32:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysamstats
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nfs/team112_internal/rp7/src/github/malariagen/Pf-6.0-public-release/deps/conda/envs/Pf-6.0-public-release/lib/python3.6/site-packages/pysamstats/__init__.py", line 8, in <module>
    from .pileup import *
  File "/nfs/team112_internal/rp7/src/github/malariagen/Pf-6.0-public-release/deps/conda/envs/Pf-6.0-public-release/lib/python3.6/site-packages/pysamstats/pileup.py", line 6, in <module>
    import pysamstats.opt as opt
  File "libcfaidx.pxd", line 52, in init pysamstats.opt
AttributeError: module 'pysam.libcfaidx' has no attribute 'FastxRecord'

@alimanfoo any suggestions?

Include git tag or hash in environment name

This is just a thought, but I wonder if it would be a good idea if the install-conda.sh script includes either the git tag (or the commit hash if using an untagged commit) in the name of the conda environment being created. E.g., if running from within vector-ops, would create an environment named "vector-ops-binder-v1.2.1" if using v1.2.1 of binder, or "vector-ops-binder-e4a69fcd" if using binder commit e4a69fc. This would allow some transparency of what the current state of the conda environment is. Also, when rerunning install-conda.sh after a binder upgrade, it would create a new environment alongside the previous environment. That way it is possible to switch between environments if needed.

Upgrade intake

A new release of intake should be imminent, including a new feature to make data catalogs including zarr data sources. When release is available, upgrade binder.

Policy on updating conda

Hi @alimanfoo @hardingnj. Our current dependencies installation method seemingly does not handle conda updates, so when running binder/install-conda.sh I get

==> WARNING: A newer version of conda exists. <==
  current version: 4.5.12
  latest version: 4.6.4

Should we include conda update in this script?

Add release number to important binder updates

Hi @alimanfoo,

It seems that binder update requires a number of follow-up actions in the dependent repos: update within each repo, environment updates for multiple repo users, sometimes in multiple instances. Maybe we should post certain version of binder as a release to notify everyone that it is time to get an updated version installed?

Update ipython package

@slejdops

Causing build failures

Downloading and Extracting Packages
certifi-2019.9.11    | 147 KB    | ##################################### | 100% 
conda-4.7.11         | 3.0 MB    | ##################################### | 100% 
ca-certificates-2019 | 144 KB    | ##################################### | 100% 
openssl-1.1.1d       | 2.1 MB    | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
conda 4.7.11
[binder] check channel priority - this must be 'true' or 'flexible', ***not*** 'strict'
channel_priority: flexible
[binder] creating environment vector-ops-3d37be2 from /home/travis/build/malariagen/vector-ops/binder/environment-pinned-linux.yml
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Traceback (most recent call last):
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1062, in __call__
    return func(*args, **kwargs)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/cli/main.py", line 73, in do_call
    exit_code = getattr(module, func_name)(args, parser)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/cli/main_create.py", line 101, in execute
    installer.install(prefix, pkg_specs, args, env)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda_env/installers/conda.py", line 27, in install
    unlink_link_transaction = solver.solve_for_transaction(prune=getattr(args, 'prune', False))
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 116, in solve_for_transaction
    should_retry_solve)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 157, in solve_for_diff
    force_remove, should_retry_solve)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 274, in solve_final_state
    ssc = self._add_specs(ssc)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/core/solve.py", line 554, in _add_specs
    explicit_pool = ssc.r._get_package_pool(self.specs_to_add)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 520, in _get_package_pool
    pool = self.get_reduced_index(specs)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 541, in get_reduced_index
    explicit_specs, features = self.verify_specs(explicit_specs)
  File "/home/travis/build/malariagen/vector-ops/binder/deps/conda/lib/python3.7/site-packages/conda/resolve.py", line 280, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound: 
  - ipython==7.9.0=py36h5ca1d4c_0
The command "./binder/install-conda.sh" failed and exited with 1 during .
Your build has been stopped.

Listed as broken in Conda
https://anaconda.org/conda-forge/ipython/files?version=7.9.0
image

https://anaconda.org/conda-forge/repo/files?type=any&label=broken

errors while running the sample notebook in GCP dataIab - Image based on v2.4.2

I have created a docker image based on binder release v2.4.2 and deployed it to
our dev cluster https://testlab.malariagen.net

I'm getting a 500 server error when I open the dask status page as well as the following errors while running the sample notebook

bokeh.util.tornado - ERROR - Error thrown from periodic callback:
bokeh.util.tornado - ERROR - Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 501, in callback
result_list.append(f.result())
File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", line 748, in run
yielded = self.gen.send(value)
File "/opt/conda/lib/python3.7/site-packages/bokeh/server/session.py", line 70, in _needs_document_lock_wrapper
result = yield yield_for_all_futures(func(self, *args, **kwargs))
File "/opt/conda/lib/python3.7/site-packages/bokeh/server/session.py", line 191, in with_document_locked
return func(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/bokeh/document/document.py", line 1127, in wrapper
return doc._with_self_as_curdoc(invoke)
File "/opt/conda/lib/python3.7/site-packages/bokeh/document/document.py", line 1113, in _with_self_as_curdoc
return f()
File "/opt/conda/lib/python3.7/site-packages/bokeh/document/document.py", line 1126, in invoke
return f(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/distributed/dashboard/components/init.py", line 78, in
doc.add_periodic_callback(lambda: update(ref), interval)
File "/opt/conda/lib/python3.7/site-packages/distributed/dashboard/components/init.py", line 85, in update
comp.update()
File "/opt/conda/lib/python3.7/site-packages/bokeh/core/property/validation.py", line 97, in func
return input_function(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/distributed/dashboard/components/scheduler.py", line 1435, in update
d = progress_quads(state)
File "/opt/conda/lib/python3.7/site-packages/distributed/diagnostics/progress_stream.py", line 105, in progress_quads
rl = width * r / a + l
ZeroDivisionError: float division by zero

Pinned environments with conda spec files

Looking through conda docs, it seems that the recommended way of creating the identical environment is creation of spec files with

conda list --explicit > spec-file.txt

Which then can be used instead of yml

conda create --name myenv --file spec-file.txt

I wonder if we could/should use those spec files instead of pinned environments as linux/MacOs specific snapshots. Or am I missing some point here?

seaborn-matplotlib version conflict

Heatmap plotting is broken when using combination

seaborn=0.9.0
matplotlib=3.1.1

This is a documented problem mwaskom/seaborn#1773. My solution was to downgrade matplotlib to matplotlib=3.1.0. The bug should be also fixed in matplotlib=3.1.2, which is currently not released.

Include R kernel for jupyter using IRkernel

I have recently used R kernel for Jupyter (https://github.com/IRkernel/IRkernel) which was straightforward to install and allows you to run R in jupyter notebooks just like you would use python. I intend to create a PR when I next need to use R. In the meantime, please shout if you have strong objections to this.

One thing I did realise when doing this is that R packages should be installed using conda, rather than R's own install.packages or other methods. See https://docs.anaconda.com/anaconda/packages/r-language-pkg-docs/. E.g. to install ape use conda install -c r r-ape.

Various package upgrades

bcolz 1.2.1 should be available via conda-forge soon. Not a high priority but would be good to upgrade.

Add deps to .gitignore

This will ensure that if you install environment from a local clone of binder, the deps directory will not be tracked in github

Documenting pitfalls in binder testing

Here's how I test binder updates in the independent repo. Tricky points here are to deactivate any envs and to do cd .. prior to conda installation to avoid an ambiguous error SpecNotFound: Invalid name, try the format: user/package.

Maybe this procedure can be improved and then documented in the readme?


Clone the repo, create new branch

git clone [email protected]:malariagen/binder.git
cd binder
git checkout -b issue_name
git push --set-upstream origin issue_name
# make some changes

Test if it did not break the installation process, but first make sure that no environment is activated, otherwise run source deactivate. Then do

cd ..
./binder/install_conda.sh
source ./binder/env.sh
# check package versions and resolve version conflicts

If all went well, push changes

cd binder
git add environment.yml
git commit -m '###'
git push
# do PR

Optional clean-up

rm -r ../deps

Update README for use by github non-ninjas

I was a bit unclear about exactly how I should use this repo before talking through with Alistair, so thought it might be useful to try to update the README for users such as me, giving a bit more explanation of the situations in which each set of commands needs to be run.

Rename environment YAML files

Currently the main linux environment file is called "environment-pinned-linux.yml". This is nice and descriptive, however it means that this module can no longer be used as a submodule to create mybinder-launchable repos, because mybinder expects a file called "environment.yml".

Proposed to change the name of "environment-pinned-linux.yml" to "environment.yml". For simplicity, proposed to also rename "environment-pinned-osx.yml" to "environment-osx.yml".

adding xpclr open_blas issues

I'd like to add xpclr to binder, but when I install directly from conda, it wants to downgrade all blas

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    gsl-2.2.1                  |       h0c605f7_3         2.6 MB
    libgfortran-ng-7.2.0       |       hdf63c60_3         1.2 MB  conda-forge
    mkl_random-1.0.2           |           py36_0         1.3 MB  conda-forge
    numpy-1.13.3               |   py36hdbf6ddf_4         3.9 MB
    scikit-learn-0.19.1        |   py36hedc7406_0         5.2 MB
    mkl_fft-1.0.10             |           py36_0         650 KB  conda-forge
    scipy-1.0.1                |   py36hfc37229_0        17.8 MB
    mkl-2018.0.3               |                1       198.7 MB
    blas-1.0                   |              mkl           6 KB
    xpclr-1.1                  |             py_0          14 KB  bioconda
    intel-openmp-2019.1        |              144         885 KB
    ------------------------------------------------------------
                                           Total:       232.3 MB

The following NEW packages will be INSTALLED:

    intel-openmp:   2019.1-144                               
    libgfortran-ng: 7.2.0-hdf63c60_3              conda-forge
    mkl:            2018.0.3-1                               
    mkl_fft:        1.0.10-py36_0                 conda-forge
    mkl_random:     1.0.2-py36_0                  conda-forge
    xpclr:          1.1-py_0                      bioconda   

The following packages will be DOWNGRADED:

    blas:           1.1-openblas                  conda-forge --> 1.0-mkl              
    gsl:            2.2.1-blas_openblash47a8a8e_5 conda-forge [blas_openblas] --> 2.2.1-h0c605f7_3     
    numpy:          1.13.3-py36_blas_openblas_201 conda-forge [blas_openblas] --> 1.13.3-py36hdbf6ddf_4
    scikit-learn:   0.19.1-py36_blas_openblas_201 conda-forge [blas_openblas] --> 0.19.1-py36hedc7406_0
    scipy:          1.0.1-py36_blas_openblas_200  conda-forge [blas_openblas] --> 1.0.1-py36hfc37229_0 

I've just verified that if I add xpclr to the binder env.yml, the numpy install is py36hdbf6ddf_4 not 1.13.3-py36_blas_openblas_201 I'm not sure if this is a channel ordering issue?

Source env.sh from any directory

Currently sourcing of env.sh works only from directory which holds binder (e.g., vector-ops). I would like to be able to source it from any dir.

This can be done by replacing

$(pwd)

with something like

repoDir=$(cd `dirname $0/../` && pwd)

I suspect that more elegant solution exists for this, so not making a PR.

Add windows support

Add support for windows users, at least for installing conda and creating the conda environment. Should be possible for most packages, although I believe the bioconda packages won't be available for windows. Work would be to create a windows batch file or similar which is equivalent to the install-conda.sh script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.