Merge pull request #74 from minrk/environment-excludes-requirements

don't install requirements.txt if environment.yml is present
pull/86/head
Yuvi Panda 2017-09-27 12:29:52 -07:00 zatwierdzone przez GitHub
commit 02ecaf36bf
6 zmienionych plików z 25 dodań i 16 usunięć

Wyświetl plik

@ -574,11 +574,6 @@ class CondaBuildPack(BuildPack):
conda clean -tipsy
"""
))
if os.path.exists('requirements.txt'):
assembly_scripts.append((
'${NB_USER}',
'pip install --no-cache-dir -r requirements.txt'
))
return assembly_scripts
def detect(self):

Wyświetl plik

@ -1,5 +1,12 @@
Python - Mixed Requirements
---------------------------
You can specify both a ``requirements.txt`` and an ``environment.yml`` file,
and both of these will be used to build your environment.
Conda - Mixed Requirements
--------------------------
An ``environment.yml`` takes precedence over ``requirements.txt``.
To install Python packages into a conda environment with pip, use the ``pip`` key in ``environment.yml``:
.. sourcecode:: yaml
dependencies:
- numpy
- pip:
- tornado

Wyświetl plik

@ -1,2 +1,4 @@
dependencies:
- numpy
- pip:
- simplejson

Wyświetl plik

@ -1,7 +1,12 @@
#!/usr/bin/env python
import sys
assert sys.version_info[:2] == (3, 6)
assert sys.version_info[:2] == (3, 6), sys.version
import numpy
import there
try:
import there
except ImportError:
pass
else:
raise Exception("'there' shouldn't have been installed from requirements.txt")

Wyświetl plik

@ -1,5 +1,5 @@
Python - Conda Environment
--------------------------
Conda Environment
-----------------
Conda environments files may allow for more complex builds and dependencies. You
can specify them in the standard YAML structure.
can specify them in the standard `environment.yml` files.

Wyświetl plik

@ -1,6 +1,6 @@
#!/usr/bin/env python
import sys
assert sys.version_info[:2] == (3, 6)
assert sys.version_info[:2] == (3, 6), sys.version
import numpy