Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter Visual Studio Code #21

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ VOLUME /notebooks
VOLUME /home/docker/.jupyter
EXPOSE 8888
COPY JUPYTER.md /assets/
COPY code /assets/
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT ["entrypoint.sh"]
CMD [ \
Expand Down
17 changes: 17 additions & 0 deletions jupyter/JUPYTER.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,23 @@ To install a new dependency (like in this example `pandas`), run the following:
poetry add pandas
```


## Visual Studio Code integration

First make sure your notebook server is running (`riptide status`), otherwise start it.

Start VSC from the project directory with `./code`.
This will start it with a setting, that allows connections to the Riptide server, without rejecting the certificate.

Make sure you have the official VSC extensions `Python` and `Jupyter` installed.

Now open your notebook in VSC.
Click on `Select Kernel` and choose `Existing Jupyter Server`.
Finally, type the server URL (given by `riptide status`) and select the shown kernel.

Now you should be able to run cells inside the notebook with your Riptide service.


## Troubleshooting

If something is not working as expected, you can attach to the logs:
Expand Down
3 changes: 3 additions & 0 deletions jupyter/code
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

NODE_TLS_REJECT_UNAUTHORIZED=0 code .
1 change: 1 addition & 0 deletions jupyter/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -x

NEW_VENV=false
cp /assets/JUPYTER.md /src
cp /assets/code /src

# create new venv if not existing
if [ ! -d .venv ]; then
Expand Down
Loading