Skip to content

Commit 2eda5c2

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f11b824 commit 2eda5c2

File tree

5 files changed

+101
-101
lines changed

5 files changed

+101
-101
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
## Setting up a dev environment
44

5-
65
### Setting up `minikube`
76

87
Currently, these instructions only work with [minikube](https://minikube.sigs.k8s.io/docs/start/)
@@ -61,4 +60,4 @@ but can be adapted to work with any other local kubernetes setup.
6160

6261
```bash
6362
jupyterhub
64-
```
63+
```

binderhub_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
21
c.BinderHub.debug = True
32

43
# Just leave the built image in the node, so our hub can launch it
54
c.BinderHub.use_registry = False
65

76
c.BinderHub.base_url = "/services/binder/"
87

9-
c.BinderHub.enable_api_only_mode = True
8+
c.BinderHub.enable_api_only_mode = True

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
git+https://github.com/jupyterhub/binderhub.git@main
12
jupyterhub
23
jupyterhub-kubespawner
3-
git+https://github.com/jupyterhub/binderhub.git@main

jupyterhub_config.py

Lines changed: 97 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import socket
21
import os
2+
import socket
3+
34
c = get_config() # noqa
45

56
from jupyterhub.auth import DummyAuthenticator
@@ -10,6 +11,7 @@
1011
# c.DummyAuthenticator.password = "your_password"
1112

1213
from kubespawner.spawner import KubeSpawner
14+
1315
c.JupyterHub.spawner_class = KubeSpawner
1416

1517
c.Spawner.cmd = ["jupyterhub-singleuser"]
@@ -18,13 +20,13 @@
1820
# the hub to be able to restart without losing user containers
1921
c.JupyterHub.cleanup_servers = False
2022
c.JupyterHub.services = [
21-
{
22-
"name": "binder",
23-
"url": "http://localhost:8585",
24-
"command": ["python", "-m", "binderhub", "-f", "binderhub_config.py"],
25-
# Pass on environment variables required for binderhub to find where the docker image is
26-
"environment": os.environ.copy()
27-
}
23+
{
24+
"name": "binder",
25+
"url": "http://localhost:8585",
26+
"command": ["python", "-m", "binderhub", "-f", "binderhub_config.py"],
27+
# Pass on environment variables required for binderhub to find where the docker image is
28+
"environment": os.environ.copy(),
29+
}
2830
]
2931

3032
# Find the IP of the machine that minikube is most likely able to talk to
@@ -37,97 +39,97 @@
3739
c.JupyterHub.hub_connect_ip = host_ip
3840

3941
from jupyterhub_fancy_profiles import setup_ui
42+
4043
setup_ui(c)
4144

4245
c.KubeSpawner.profile_list = [
43-
{
44-
"display_name": "Small",
45-
"description": "~2 CPU, ~2G RAM",
46-
"profile_options": {
47-
"image": {
48-
"display_name": "Image",
49-
"unlisted_choice": {
50-
"enabled": True,
51-
"display_name": "Custom image",
52-
"validation_regex": "^.+:.+$",
53-
"validation_message": "Must be a publicly available docker image, of form <image-name>:<tag>",
54-
"display_name_in_choices": "Specify an existing docker image",
55-
"description_in_choices": "Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc)",
56-
"kubespawner_override": {
57-
"image": "{value}"
58-
}
59-
},
60-
"choices": {
61-
"pangeo": {
62-
"display_name": "Pangeo Notebook Image", "description": "Python image with scientific, dask and geospatial tools",
63-
"kubespawner_override": {
64-
"image": "pangeo/pangeo-notebook:2023.09.11"
65-
}
66-
},
67-
"geospatial": {
68-
"display_name": "Rocker Geospatial",
69-
"description": "R image with RStudio, the tidyverse & Geospatial tools",
70-
"default": True,
71-
"slug": "geospatial",
72-
"kubespawner_override": {
73-
"image": "rocker/binder:4.3",
74-
"default_url": "/rstudio",
75-
"working_dir": "/home/rstudio",
76-
}
77-
},
78-
"scipy": {
79-
"display_name": "Jupyter SciPy Notebook",
80-
"slug": "scipy",
81-
"kubespawner_override": {
82-
"image": "jupyter/scipy-notebook:2023-06-26"
83-
}
84-
}
85-
}
86-
},
87-
"resources": {
88-
"display_name": "Resource Allocation",
89-
"choices": {
90-
"mem_2_7": {
91-
"display_name": "2.7 GB RAM, upto 3.479 CPUs",
92-
"description": "Use this for the workshop on 2023 September",
93-
"kubespawner_override": {
94-
"mem_guarantee": 1024,
95-
"mem_limit": 2904451072,
96-
"cpu_guarantee": 0.1,
97-
"cpu_limit": 3.479,
46+
{
47+
"display_name": "Small",
48+
"description": "~2 CPU, ~2G RAM",
49+
"profile_options": {
50+
"image": {
51+
"display_name": "Image",
52+
"unlisted_choice": {
53+
"enabled": True,
54+
"display_name": "Custom image",
55+
"validation_regex": "^.+:.+$",
56+
"validation_message": "Must be a publicly available docker image, of form <image-name>:<tag>",
57+
"display_name_in_choices": "Specify an existing docker image",
58+
"description_in_choices": "Use a pre-existing docker image from a public docker registry (dockerhub, quay, etc)",
59+
"kubespawner_override": {"image": "{value}"},
60+
},
61+
"choices": {
62+
"pangeo": {
63+
"display_name": "Pangeo Notebook Image",
64+
"description": "Python image with scientific, dask and geospatial tools",
65+
"kubespawner_override": {
66+
"image": "pangeo/pangeo-notebook:2023.09.11"
67+
},
68+
},
69+
"geospatial": {
70+
"display_name": "Rocker Geospatial",
71+
"description": "R image with RStudio, the tidyverse & Geospatial tools",
72+
"default": True,
73+
"slug": "geospatial",
74+
"kubespawner_override": {
75+
"image": "rocker/binder:4.3",
76+
"default_url": "/rstudio",
77+
"working_dir": "/home/rstudio",
78+
},
79+
},
80+
"scipy": {
81+
"display_name": "Jupyter SciPy Notebook",
82+
"slug": "scipy",
83+
"kubespawner_override": {
84+
"image": "jupyter/scipy-notebook:2023-06-26"
85+
},
86+
},
87+
},
9888
},
99-
"default": True
100-
},
101-
"mem_5_4": {
102-
"display_name": "5.4 GB RAM, upto 3.479 CPUs",
103-
"kubespawner_override": {
104-
"mem_guarantee":1024,
105-
"mem_limit": 5808902144,
106-
"cpu_guarantee": 0.1,
107-
"cpu_limit": 3.479,
108-
}
109-
},
110-
"mem_10_8": {
111-
"display_name": "10.8 GB RAM, upto 3.479 CPUs",
112-
"kubespawner_override": {
113-
"mem_guarantee": 1024,
114-
"mem_limit": 11617804288,
115-
"cpu_guarantee": 0.1,
116-
"cpu_limit": 3.479,
117-
}
118-
},
119-
"mem_21_6": {
120-
"display_name": "21.6 GB RAM, upto 3.479 CPUs",
121-
"description": "Large amount of RAM, might start slowly",
122-
"kubespawner_override": {
123-
"mem_guarantee": 1024,
124-
"mem_limit": 23235608576,
125-
"cpu_guarantee": 0.1,
126-
"cpu_limit": 3.479
89+
"resources": {
90+
"display_name": "Resource Allocation",
91+
"choices": {
92+
"mem_2_7": {
93+
"display_name": "2.7 GB RAM, upto 3.479 CPUs",
94+
"description": "Use this for the workshop on 2023 September",
95+
"kubespawner_override": {
96+
"mem_guarantee": 1024,
97+
"mem_limit": 2904451072,
98+
"cpu_guarantee": 0.1,
99+
"cpu_limit": 3.479,
100+
},
101+
"default": True,
102+
},
103+
"mem_5_4": {
104+
"display_name": "5.4 GB RAM, upto 3.479 CPUs",
105+
"kubespawner_override": {
106+
"mem_guarantee": 1024,
107+
"mem_limit": 5808902144,
108+
"cpu_guarantee": 0.1,
109+
"cpu_limit": 3.479,
110+
},
111+
},
112+
"mem_10_8": {
113+
"display_name": "10.8 GB RAM, upto 3.479 CPUs",
114+
"kubespawner_override": {
115+
"mem_guarantee": 1024,
116+
"mem_limit": 11617804288,
117+
"cpu_guarantee": 0.1,
118+
"cpu_limit": 3.479,
119+
},
120+
},
121+
"mem_21_6": {
122+
"display_name": "21.6 GB RAM, upto 3.479 CPUs",
123+
"description": "Large amount of RAM, might start slowly",
124+
"kubespawner_override": {
125+
"mem_guarantee": 1024,
126+
"mem_limit": 23235608576,
127+
"cpu_guarantee": 0.1,
128+
"cpu_limit": 3.479,
129+
},
130+
},
131+
},
127132
},
128-
}
129-
}
130-
}
133+
},
131134
}
132-
}
133135
]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ classifiers = [
1818
]
1919

2020
[tool.setuptools_scm]
21-
version_file = "jupyterhub_fancy_profiles/_version.py"
21+
version_file = "jupyterhub_fancy_profiles/_version.py"

0 commit comments

Comments
 (0)