mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-21 18:06:36 +02:00
add docker-stack.yml for polipo
This commit is contained in:
parent
3deb43b51b
commit
096e939b78
@ -3,6 +3,8 @@ dask
|
||||
|
||||
[Dask][1] is a flexible library for parallel computing in Python.
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ mkdir -p data/{jupyter,work}
|
||||
$ chown -R 1000:100 data
|
||||
@ -11,4 +13,18 @@ $ docker-compose logs -f notebook
|
||||
$ curl http://127.0.0.1:8888
|
||||
```
|
||||
|
||||
## make it public
|
||||
|
||||
```bash
|
||||
$ docker exec -it xxxxxx bash
|
||||
>>> jupyter notebook password
|
||||
Enter password: ****
|
||||
Verify password: ****
|
||||
[NotebookPasswordApp] Wrote hashed password to ~/.jupyter/jupyter_notebook_config.json
|
||||
|
||||
$ docker service update --force dask_notebook
|
||||
```
|
||||
|
||||
- <https://jupyter-notebook.readthedocs.io/en/stable/public_server.html>
|
||||
|
||||
[1]: https://docs.dask.org/en/latest/
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "3.7"
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
@ -10,13 +10,6 @@ services:
|
||||
- "8787:8787"
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
image: daskdev/dask
|
||||
command: ["dask-worker", "tcp://scheduler:8786"]
|
||||
depends_on:
|
||||
- scheduler
|
||||
restart: unless-stopped
|
||||
|
||||
notebook:
|
||||
image: daskdev/dask-notebook
|
||||
ports:
|
||||
@ -31,3 +24,10 @@ services:
|
||||
depends_on:
|
||||
- scheduler
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
image: daskdev/dask
|
||||
command: ["dask-worker", "tcp://scheduler:8786"]
|
||||
depends_on:
|
||||
- scheduler
|
||||
restart: unless-stopped
|
||||
|
52
dask/docker-stack.yml
Normal file
52
dask/docker-stack.yml
Normal file
@ -0,0 +1,52 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
scheduler:
|
||||
image: daskdev/dask
|
||||
command: ["dask-scheduler"]
|
||||
ports:
|
||||
- "8786:8786"
|
||||
- "8787:8787"
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
notebook:
|
||||
image: daskdev/dask-notebook
|
||||
ports:
|
||||
- "8888:8888"
|
||||
volumes:
|
||||
- /home/presto/fig/dask/data/jupyter:/home/jovyan/.jupyter
|
||||
- /home/presto/fig/dask/data/work:/home/jovyan/work
|
||||
- /opt/conda/lib/python3.7/site-packages
|
||||
environment:
|
||||
- DASK_SCHEDULER_ADDRESS=tcp://scheduler:8786
|
||||
- EXTRA_PIP_PACKAGES=dateparser parsel
|
||||
depends_on:
|
||||
- scheduler
|
||||
deploy:
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
worker:
|
||||
image: daskdev/dask
|
||||
command: ["dask-worker", "tcp://scheduler:8786"]
|
||||
depends_on:
|
||||
- scheduler
|
||||
deploy:
|
||||
replicas: 2
|
||||
placement:
|
||||
max_replicas_per_node: 1
|
||||
constraints:
|
||||
- node.role == worker
|
||||
restart_policy:
|
||||
condition: on-failure
|
@ -9,14 +9,16 @@ group.
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
polipo:
|
||||
image: vimagick/polipo
|
||||
command:
|
||||
authCredentials=username:password
|
||||
socksParentProxy=1.2.3.4:9050
|
||||
ports:
|
||||
- "8123:8123"
|
||||
restart: always
|
||||
version: "3.8"
|
||||
services:
|
||||
polipo:
|
||||
image: vimagick/polipo
|
||||
command:
|
||||
authCredentials=username:password
|
||||
socksParentProxy=1.2.3.4:9050
|
||||
ports:
|
||||
- "8123:8123"
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
## server
|
||||
|
@ -1,8 +1,10 @@
|
||||
polipo:
|
||||
image: vimagick/polipo
|
||||
command:
|
||||
authCredentials=username:password
|
||||
socksParentProxy=1.2.3.4:9050
|
||||
ports:
|
||||
- "8123:8123"
|
||||
restart: always
|
||||
version: "3.8"
|
||||
services:
|
||||
polipo:
|
||||
image: vimagick/polipo
|
||||
command:
|
||||
authCredentials=username:password
|
||||
socksParentProxy=1.2.3.4:9050
|
||||
ports:
|
||||
- "8123:8123"
|
||||
restart: unless-stopped
|
||||
|
20
polipo/docker-stack.yml
Normal file
20
polipo/docker-stack.yml
Normal file
@ -0,0 +1,20 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
polipo:
|
||||
image: vimagick/polipo
|
||||
networks:
|
||||
- host_network
|
||||
deploy:
|
||||
mode: global
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == worker
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
networks:
|
||||
host_network:
|
||||
external: true
|
||||
name: host
|
Loading…
Reference in New Issue
Block a user