Skip to content

Commit 47e0fe5

Browse files
committed
⬆️ Upgrade Jupyter to use Lab, update util/env var for local development
1 parent 42ee0fe commit 47e0fe5

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

{{cookiecutter.project_slug}}/backend/backend.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ RUN pip install celery~=4.3 passlib[bcrypt] tenacity requests emails "fastapi>=0
44

55
# For development, Jupyter remote kernel, Hydrogen
66
# Using inside the container:
7-
# jupyter notebook --ip=0.0.0.0 --allow-root
7+
# jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
88
ARG env=prod
9-
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi"
9+
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
1010
EXPOSE 8888
1111

1212
COPY ./app /app

{{cookiecutter.project_slug}}/backend/celeryworker.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ RUN pip install raven celery~=4.3 passlib[bcrypt] tenacity requests "fastapi>=0.
44

55
# For development, Jupyter remote kernel, Hydrogen
66
# Using inside the container:
7-
# jupyter notebook --ip=0.0.0.0 --allow-root
7+
# jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
88
ARG env=prod
9-
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi"
9+
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
1010
EXPOSE 8888
1111

1212
ENV C_FORCE_ROOT=1

{{cookiecutter.project_slug}}/backend/tests.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ RUN pip install requests pytest tenacity passlib[bcrypt] "fastapi>=0.16.0" psyco
44

55
# For development, Jupyter remote kernel, Hydrogen
66
# Using inside the container:
7-
# jupyter notebook --ip=0.0.0.0 --allow-root
7+
# jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
88
ARG env=prod
9-
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyter ; fi"
9+
RUN bash -c "if [ $env == 'dev' ] ; then pip install jupyterlab ; fi"
1010
EXPOSE 8888
1111

1212
COPY ./app /app

{{cookiecutter.project_slug}}/docker-compose.dev.env.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ version: '3.3'
22
services:
33
backend:
44
environment:
5-
- 'JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root'
5+
- JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
66
- SERVER_HOST=http://${DOMAIN}
77
celeryworker:
88
environment:
99
- RUN=celery worker -A app.worker -l info -Q main-queue -c 1
10-
- JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root
10+
- JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888
1111
- SERVER_HOST=http://${DOMAIN}
1212
backend-tests:
1313
environment:
14-
- JUPYTER=jupyter notebook --ip=0.0.0.0 --allow-root
14+
- JUPYTER=jupyter lab --ip=0.0.0.0 --allow-root --NotebookApp.custom_display_url=http://127.0.0.1:8888

0 commit comments

Comments
 (0)