kopia lustrzana https://github.com/jupyterhub/repo2docker
Escape environment variable when using Python string formatting
rodzic
b8d8206bf2
commit
0ef79326e5
|
@ -53,7 +53,9 @@ class PythonBuildPack(CondaBuildPack):
|
||||||
if os.path.exists(nb_requirements_file):
|
if os.path.exists(nb_requirements_file):
|
||||||
assemble_scripts.append((
|
assemble_scripts.append((
|
||||||
'${NB_USER}',
|
'${NB_USER}',
|
||||||
'${NB_PYTHON_PREFIX}/bin/pip install --no-cache-dir -r "{}"'.format(nb_requirements_file)
|
# want the $NB_PYHTON_PREFIX environment variable, not for
|
||||||
|
# Python's string formatting to try and replace this
|
||||||
|
'${{NB_PYTHON_PREFIX}}/bin/pip install --no-cache-dir -r "{}"'.format(nb_requirements_file)
|
||||||
))
|
))
|
||||||
|
|
||||||
# install requirements.txt in the kernel env
|
# install requirements.txt in the kernel env
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# install this in the kernel's environment, the user wants Python 2 there
|
||||||
|
numpy
|
|
@ -0,0 +1,3 @@
|
||||||
|
# install this in the environment in which the notebook server
|
||||||
|
# is running nbgitpuller does not work with Python 2
|
||||||
|
nbgitpuller==0.6.1
|
|
@ -0,0 +1 @@
|
||||||
|
python-2.7
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env python2
|
||||||
|
import sys
|
||||||
|
|
||||||
|
print(sys.version_info)
|
||||||
|
assert sys.version_info[:2] == (2, 7)
|
||||||
|
|
||||||
|
import numpy
|
Ładowanie…
Reference in New Issue