set CONDA_DEFAULT_ENV

so that `conda install` commands affect the kernel environment instead of the base env

This should preserve `conda install` behavior for Dockerfiles that inherit from r2d images.
This behavior is already managed by the ENTRYPOINT which properly activates the env.
pull/690/head
Min RK 2019-05-24 10:51:18 +02:00
rodzic 91309cab25
commit f5999a0b61
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -36,6 +36,13 @@ class CondaBuildPack(BaseImage):
env.append(('KERNEL_PYTHON_PREFIX', '${NB_PYTHON_PREFIX}'))
return env
def get_env(self):
"""Make kernel env the default for `conda install`"""
env = super().get_env() + [
('CONDA_DEFAULT_ENV', '${KERNEL_PYTHON_PREFIX}'),
]
return env
def get_path(self):
"""Return paths (including conda environment path) to be added to
the PATH environment variable.