Created
July 17, 2019 08:36
-
-
Save janfreyberg/a959244c3a523e118fd40c839ee1798d to your computer and use it in GitHub Desktop.
Pydata superintendent talk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use postgres/example user/password credentials | |
version: '3.1' | |
services: | |
db: | |
image: postgres | |
restart: always | |
environment: | |
POSTGRES_USER: superintendent | |
POSTGRES_PASSWORD: superintendent | |
POSTGRES_DB: labelling | |
volumes: | |
- ./postgres-data:/var/lib/postgresql/data | |
ports: | |
- 5432:5432 | |
adminer: | |
image: adminer | |
restart: always | |
ports: | |
- 8080:8080 | |
notebook: | |
image: voila | |
restart: always | |
volumes: | |
- ./voila-interface.ipynb:/home/anaconda/app/app.ipynb | |
ports: | |
- 8866:8866 | |
orchestrator: | |
image: voila | |
restart: always | |
entrypoint: /opt/conda/bin/python orchestrate.py | |
volumes: | |
- ./orchestrate.py:/home/anaconda/app/orchestrate.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
voila>=0.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from superintendent.distributed import SemiSupervisor\n", | |
"\n", | |
"widget = SemiSupervisor.from_images(\n", | |
" connection_string=\"postgresql+psycopg2://superintendent:superintendent@db:5432/labelling\",\n", | |
" options=range(10)\n", | |
")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"widget" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM continuumio/miniconda3:4.6.14-alpine | |
RUN /opt/conda/bin/pip install --upgrade pip | |
RUN mkdir /home/anaconda/app | |
WORKDIR /home/anaconda/app | |
COPY docker-requirements.txt docker-requirements.txt | |
RUN /opt/conda/bin/pip install -r docker-requirements.txt | |
# install superintendent from pypi | |
COPY . . | |
RUN /opt/conda/bin/pip install --user . | |
# RUN /opt/conda/bin/pip install superintendent | |
ONBUILD COPY . . | |
ONBUILD RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
ENTRYPOINT ["/opt/conda/bin/voila"] | |
CMD ["app.ipynb"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment