kopia lustrzana https://github.com/jupyterhub/repo2docker
Merge pull request #74 from minrk/environment-excludes-requirements
don't install requirements.txt if environment.yml is presentpull/86/head
commit
02ecaf36bf
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
dependencies:
|
||||
- numpy
|
||||
- pip:
|
||||
- simplejson
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue