Skip to content

Commit

Permalink
rm unoused function
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusdc committed Apr 2, 2024
1 parent aafce2a commit ad949b6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions roles/jupyterhub/templates/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@
from jupyterhub.traitlets import Callable
from tornado import gen

# Find all conda environments that have dask jupyterlab, batchspawner, and jupyterhub installed
jupyterlab_packages = ['jupyterlab', 'batchspawner', 'jupyterhub']
def conda_envs_w_packages(packages, names_only=False):
_environments = []
output = subprocess.check_output(['conda', 'env', 'list', '--json'])
environments = json.loads(output)['envs']
for environment in environments:
output = subprocess.check_output(['conda', 'list', '-p', environment, '--json'])
if set(packages) <= {_['name'] for _ in json.loads(output)}:
_environments.append((os.path.basename(environment), environment))
if names_only:
return [env_name for env_name, path in _environments]
return _environments


# Allow gathering of jupyterhub prometheus metrics
c.JupyterHub.authenticate_prometheus = False

Expand Down

0 comments on commit ad949b6

Please sign in to comment.