diff --git a/Dockerfile b/Dockerfile index 9d54099..6c982d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,8 @@ RUN apt-get install -y \ libffi-dev \ python3-dev \ python3-pip \ - curl + curl \ + gcc # Change Aliases RUN cd "$(dirname $(which python3))" \ diff --git a/README.md b/README.md index 136347b..9772d7e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,15 @@ Make sure to wait at least 30 seconds before launching any service ! # Development -1. After making your changes, run `docker-compose build -f dev-docker-compose.yml` +1. After making your changes, run `docker-compose -f dev-docker-compose.yml build` -*(N.B. : the build process may be long, due to the build of jupyterlab after installing extensions)* + + +# Commande pour executer un notebook rapidement terminal jupyterlab +`docker exec jupyterlab bash /scripts/run_notebook.sh /home/notebooks/Data_SIMA/P.O.C/immats_03_21.ipynb` + +`docker exec jupyterlab bash /scripts/run_notebook.sh /home/notebooks/Data_SIMA/P.O.C/immats_2018.ipynb` + +`docker exec jupyterlab bash /scripts/run_notebook.sh /home/notebooks/Data_SIMA/P.O.C/immats_2019.ipynb` + +`docker exec jupyterlab bash /scripts/run_notebook.sh /home/notebooks/Data_SIMA/P.O.C/immats_2020.ipynb` \ No newline at end of file diff --git a/datafuel.docker-compose.yml b/datafuel.docker-compose.yml deleted file mode 100644 index ddd3446..0000000 --- a/datafuel.docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: '3' - -services: - jupyterlab: - image: datafuel/jupyterlab - environment: - - TOKEN=$TOKEN - command: "jupyter lab --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token=$TOKEN" - volumes: - - ./notebooks:/home/notebooks - ports: - - 8888:8888 - -networks: - default: - external: - name: datafuel-local-network - \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 3cbc4b9..74eda1c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,18 @@ version: '3' services: jupyterlab: image: datafuel/jupyterlab + container_name: jupyterlab environment: - TOKEN=$TOKEN command: "jupyter lab --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token=$TOKEN" volumes: - ./notebooks:/home/notebooks + - ./scripts:/scripts ports: - - 8888:8888 \ No newline at end of file + - 8888:8888 + +networks: + default: + external: + name: datafuel-local-network + \ No newline at end of file diff --git a/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb deleted file mode 100644 index 7fec515..0000000 --- a/notebooks/.ipynb_checkpoints/Untitled-checkpoint.ipynb +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cells": [], - "metadata": {}, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/Untitled.ipynb b/notebooks/Untitled.ipynb deleted file mode 100644 index e1c80b5..0000000 --- a/notebooks/Untitled.ipynb +++ /dev/null @@ -1,32 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "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.8.2" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/requirements.txt b/requirements.txt index 88fac3b..eb35611 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,8 @@ requests Scrapy jupyterlab ipydeps -xeus-python \ No newline at end of file +xeus-python +xlrd +openpyxl +SQLAlchemy +psycopg2-binary \ No newline at end of file diff --git a/scripts/run_notebook.sh b/scripts/run_notebook.sh new file mode 100755 index 0000000..7603bf5 --- /dev/null +++ b/scripts/run_notebook.sh @@ -0,0 +1,2 @@ +NOTEBOOK=$1 +jupyter nbconvert --to notebook --execute $NOTEBOOK \ No newline at end of file