From 42509acba3ad501c81dfc9197f8a2ede52b5a68e Mon Sep 17 00:00:00 2001 From: Aart Goossens Date: Wed, 21 Apr 2021 17:30:03 +0200 Subject: [PATCH] Make local Jupyter a bit more development-friendly --- docker/Dockerfile.jupyter | 13 ++++++++++--- docker/docker-compose.docs.yml | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.jupyter b/docker/Dockerfile.jupyter index e268737..7a1c07e 100644 --- a/docker/Dockerfile.jupyter +++ b/docker/Dockerfile.jupyter @@ -1,9 +1,16 @@ FROM python -ENV PYTHONPATH "${PYTHONPATH}:/src" RUN pip install jupyter +RUN mkdir /build +WORKDIR /build +COPY pyproject.toml poetry.lock README.md ./ +RUN mkdir /sweat +COPY sweat ./sweat + +RUN pip install . + RUN mkdir /src/ -WORKDIR /src/ +WORKDIR /src/docs/docs -CMD pip install . && cd docs/docs/ && jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' --NotebookApp.password='' +CMD jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' --NotebookApp.password='' diff --git a/docker/docker-compose.docs.yml b/docker/docker-compose.docs.yml index 3fa78e4..7860cbc 100644 --- a/docker/docker-compose.docs.yml +++ b/docker/docker-compose.docs.yml @@ -22,6 +22,8 @@ services: build: context: .. dockerfile: docker/Dockerfile.jupyter + environment: + - PYTHONPATH=/src:${PYTHONPATH} ports: - "8889:8888" volumes: