1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

update jupyter

This commit is contained in:
kev 2020-04-22 18:17:32 +08:00
parent 096e939b78
commit ed3e8b655c
2 changed files with 35 additions and 10 deletions

View File

@ -11,15 +11,44 @@ notebook:
ports: ports:
- "8888:8888" - "8888:8888"
volumes: volumes:
- ./work:/home/jovyan/work - ./data:/home/jovyan
restart: unless-stopped restart: unless-stopped
``` ```
## up and running ## up and running
```bash
$ cd ~/fig/jupyter/
$ mkdir -p data/.jupyter
$ chown -R 1000:100 data
$ docker-compose up -d
$ curl http://127.0.0.1:8888
``` ```
cd ~/fig/jupyter/
mkdir work ## reset password
chown 1000:1000 work
docker-compose up -d ```bash
$ docker-compose exec notebook bash
>>> jupyter notebook password
Enter password: ******
Verify password: ******
[NotebookPasswordApp] Wrote hashed password to /home/jovyan/.jupyter/jupyter_notebook_config.json
$ docker-compose restart
``` ```
## without password
File: ./data/.jupyter/jupyter_notebook_config.json
```json
{
"NotebookApp": {
"token": "",
"password": ""
}
}
```
## nginx config
- <https://hands-on.cloud/how-to-setup-jupyter-behind-nginx-proxy/>

View File

@ -3,9 +3,5 @@ notebook:
ports: ports:
- "8888:8888" - "8888:8888"
volumes: volumes:
- ./work:/home/jovyan/work - ./data:/home/jovyan
# - ./notebook.pem:/home/jovyan/.local/share/jupyter/notebook.pem
# environment:
# - PASSWORD=YOURPASS
# - USE_HTTPS=yes
restart: unless-stopped restart: unless-stopped