Jan Stastny

Software engineer at Deepnote
πŸ§‘β€πŸ­

Static IP addresses

admin πŸ§‘β€πŸ­
We have not officially shared this feature in Product updates yet, so you’re the first to know because we are very excited about this one.

Many Deepnote users have been asking for the list of IP addresses that Deepnote uses to access the Internet. Up until recently, the answer was not very satisfying. We did not have a fixed set of IP addresses - making it impossible to for example, authorize the Deepnote's IP addresses at your database.


Static IP addresses are here πŸŽ‰πŸŽ‰πŸŽ‰


The wait is over and thanks to the recent changes to our infrastructure, we now have a fixed set of IP addresses that we use to access the Internet -- including the SQL databases connected through the Integrations. The IP addresses we use are:

  • 34.236.123.2
  • 52.5.148.98
  • 3.230.134.18
  • 3.209.101.227

These static IP addresses are used for all projects if you have a Deepnote Team or Enterprise plan.

We have also published an article showing how to authorize the static IP addresses in GCP Cloud SQL.

We hope this makes it easier for you to integrate your database or other resources with Deepnote.

Don't hesitate to reach out to us in case you have any problem setting this up for your use case.
Like Comment

GitLab repos in Deepnote

admin πŸ§‘β€πŸ­
GitLab users could be initially sad only seeing the Octocat icon in the sidebar menu of Deepnote. While the integration of Deepnote with GitLab is slightly more manual than the GitHub integration, it is still possible. I have written a step by step guide on how to achieve that.

I would be interested to learn how many GitLab users we have here. Did the guide work for you? Do you have some suggestions to make it better? Will be happy to hear either in comments or in DM!
Like Comment

Ruby on Rails in Deepnote

admin πŸ§‘β€πŸ­
Joining the Deepnote development team after years in Ruby on Rails, the one thing I have missed the most was the powerful rails console. Being able to connect to staging or production server, fire up rails console and query some data based on the existing ActiveRecord models, their scopes and relations has been extremely helpful in many situations.

Over the time I have developed number of "Rails console snippets" -- typically sequences of wheres, joins, filters and maps. I have kept a text file with these stored somewhere on my computer.

Together with Simon, we thought that having the power of rails console combined with a Notebook experience could be a useful tool in the toolbox of a Rails developer. Adding the collaborative nature of Deepnote on top of this makes it even more powerful as it gives you a central storage for all of those "Rails snippets text file"s that were spread around computers of all the developers.

Deepnote's support of Custom Environments has made this possible and we have written article that shows how to make this possible in your Deepnote project.

Do we have any Ruby on Rails developers here? If so -- do you find this useful? I would be happy to hear your feedback.

Like Comment

Plotly in R project

admin πŸ§‘β€πŸ­
One fellow Deepnote user was trying to install Plotly R library. I thought both the process of installing it and the end result is worth sharing.

Plotly installation

To install install Plotly R library, you will first need couple system packages installed. Namely you need `libcurl4-openssl-dev` and `libssl-dev` Debian packages. You can install these with `apt-get update && apt-get install -y libcurl4-openssl-dev libssl-dev`. To persist the installation over reboots, you can
use the Local Dockefile Environment in Deepnote
After that, you will be able to install the R package with `install.packages('plotly')` inside of the R runtime. One could say it would be tempting to add this to the Local Docker file as well. This is definitely possible and the resulting Dockerfile may look something like this:

FROM deepnote/ir:4.0.3

# Dependencies for plotly R library
RUN apt-get update && apt-get install -y libcurl4-openssl-dev libssl-dev

RUN R -e "install.packages('plotly', lib='/usr/local/lib/R/site-library')"

Example project

With Plotly installed, you can go ahead and try some shiny examples from the library documentation.

I have copied couple of them into a sample project.
ο»Ώ
ο»Ώ
ο»Ώ
ο»Ώ

Local Dockerfile build timeout

In case you are running on the Deepnote free plan, you may notice that building of the Local Dockerfile environment sometimes fails when installing R packages, because they take ages to install.

Build and push to DockerHub

To work around this, you can always host the Docker image on DockerHub and just point your Deepnote project to that image.

I have done exactly that and pushed the Docker image built from the Dockerfile pasted above to my public DockerHub repository.

The whole process of building and publishing of the image was:
  1. Create file named Dockerfile with the following content:
    FROM deepnote/ir:4.0.3

    # Dependencies for plotly R library
    RUN apt-get update && apt-get install -y libcurl4-openssl-dev libssl-dev

    RUN R -e "install.packages('plotly', lib='/usr/local/lib/R/site-library')"
  2. Build the docker image: `docker build . -t jstastny/ir-plotly:4.0.3`
  3. Push it to the DockerHub: `docker push jstastny/ir-plotly:4.0.3`

Use in Docker environment

After that, I was able to configure my project to use this as a Custom Docker Image
ο»Ώ
ο»Ώ

Preinstalled R packages?

When doing this, I was thinking that having some R packages readily available in Deepnote, similarly like we have them pre-installed in Python could be useful. What do you think? Would that be useful for you? And if so, which packages would you like to see preinstalled?
Like Comment

Yet-another Jan from Deepnote

admin πŸ§‘β€πŸ­
Hey everybody.

I am yet-another Jan from Deepnote, where I try my best to make sure our infrastructure and backend are stable and robust to bring you flawless experience when working with Deepnote.

I have three beautiful daughters and perfect wife. We live on the outskirts of Prague. We love camping, skiing, cycling, hiking and in general doing any kind of outdoor activity together with Alps being our favorite vacation destination.

Feel free to reach out whenever you feel like having ideas on how to improve the Deepnote experience or if you want to talk about what it is like having 3 girls two years apart :)
Like Comment