mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-03-29 21:47:14 +02:00
update jupyter
This commit is contained in:
parent
f15dbc04ac
commit
c3017ee754
jupyter
@ -8,14 +8,15 @@ Minimal Jupyter Notebook Stack
|
|||||||
[how to select an image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html)
|
[how to select an image](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
notebook:
|
version: "3.8"
|
||||||
image: jupyter/scipy-notebook
|
services:
|
||||||
hostname: jupyter-notebook
|
notebook:
|
||||||
ports:
|
image: jupyter/minimal-notebook
|
||||||
- "8888:8888"
|
ports:
|
||||||
volumes:
|
- "8888:8888"
|
||||||
- ./data:/home/jovyan
|
volumes:
|
||||||
restart: unless-stopped
|
- ./data:/home/jovyan
|
||||||
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
## up and running
|
## up and running
|
||||||
@ -47,11 +48,20 @@ File: ./data/.jupyter/jupyter_notebook_config.json
|
|||||||
{
|
{
|
||||||
"NotebookApp": {
|
"NotebookApp": {
|
||||||
"token": "",
|
"token": "",
|
||||||
"password": ""
|
"password": "",
|
||||||
|
"disable_check_xsrf": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## kill idle kernels (1 week ago)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s "http://127.0.0.1:8888/api/kernels" |
|
||||||
|
jq -r '.[]|select(now - (.last_activity|sub("\\..*Z";"Z")|fromdateiso8601) > 3600*24*7 and .connections==0).id' |
|
||||||
|
while read kid; do curl -s -w '\n' -X DELETE "http://127.0.0.1:8888/api/kernels/$kid"; done
|
||||||
|
```
|
||||||
|
|
||||||
## nginx config
|
## nginx config
|
||||||
|
|
||||||
- <https://hands-on.cloud/how-to-setup-jupyter-behind-nginx-proxy/>
|
- <https://hands-on.cloud/how-to-setup-jupyter-behind-nginx-proxy/>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
notebook:
|
version: "3.8"
|
||||||
image: jupyter/scipy-notebook
|
services:
|
||||||
hostname: jupyter-notebook
|
notebook:
|
||||||
ports:
|
image: jupyter/minimal-notebook
|
||||||
- "8888:8888"
|
ports:
|
||||||
volumes:
|
- "8888:8888"
|
||||||
- ./data:/home/jovyan
|
volumes:
|
||||||
restart: unless-stopped
|
- ./data:/home/jovyan
|
||||||
|
restart: unless-stopped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user