quaintitative

I write about my explorations in AI and other quaintitative areas.

For more about me and my other interests, visit playgrd, quaintitative or socials below


Categories
Subscribe

Setting Up a Data Lab Environment - Part 2 - Jupyter notebook in AWS with Docker

If it ain’t broke, should it still be fixed?

Why do we need to use Docker, when serving a Jupyter notebook on AWS ain’t that hard? I had posted some past tutorials on this on Medium previously.

In this one, I will show how much more trivial the task can be when Docker is used. Just with two scripts that are at this repo, we will be able, in 3 steps do what we did above.

First, we need to set up an EC2 instance at AWS and SSH in. If you need details on how to do this, look here.

Once you are in, 4 lines of code will get you a Jupyter notebook up on AWS.

Clone my Github repo.

git clone https://github.com/playgrdstar/docker_jupyter.git

Get into the folder.

cd docker_jupyter

Run a bash script to install Docker and setup the necessary folders within.

bash initialize.sh

Use docker-compose to setup a container with a Jupyter image, and run it.

docker-compose up -d

That’s it! Now, when you go to <ip>:8888, you will see the Jupyter notebook page.

We now just need the token to get in. All you need to do is to see the containers that are running, and get the name of the container.

docker-compose ps

Access the logs with the name of the container.

docker logs <container_name>

Now just copy and paste the token password in.

To stop everything, just do this.

docker-compose down

That’s it. Easy peasy.

There is, of course, the matter of explaining the code in initialize.sh and docker-compose.yml, which I will go through in a subsequent post.


Articles

Comparing Prompts for Different Large Language Models (Other than ChatGPT)
AI and UIs
Listing NFTs
Extracting and Processing Wikidata datasets
Extracting and Processing Google Trends data
Extracting and Processing Reddit datasets from PushShift
Extracting and Processing GDELT GKG datasets from BigQuery
Some notes relating to Machine Learning
Some notes relating to Python
Using CCapture.js library with p5.js and three.js
Introduction to PoseNet with three.js
Topic Modelling
Three.js Series - Manipulating vertices in three.js
Three.js Series - Music and three.js
Three.js Series - Simple primer on three.js
HTML Scraping 101
(Almost) The Simplest Server Ever
Tweening in p5.js
Logistic Regression Classification in plain ole Javascript
Introduction to Machine Learning Right Inside the Browser
Nature and Math - Particle Swarm Optimisation
Growing a network garden in D3
Data Analytics with Blender
The Nature of Code Ported to Three.js
Primer on Generative Art in Blender
How normal are you? Checking distributional assumptions.
Monte Carlo Simulation of Value at Risk in Python
Measuring Expected Shortfall in Python
Style Transfer X Generative Art
Measuring Market Risk in Python
Simple charts | crossfilter.js and dc.js
d3.js vs. p5.js for visualisation
Portfolio Optimisation with Tensorflow and D3 Dashboard
Setting Up a Data Lab Environment - Part 6
Setting Up a Data Lab Environment - Part 5
Setting Up a Data Lab Environment - Part 4
Setting Up a Data Lab Environment - Part 3
Setting Up a Data Lab Environment - Part 2
Setting Up a Data Lab Environment - Part 1
Generating a Strange Attractor in three.js
(Almost) All the Most Common Machine Learning Algorithms in Javascript
3 Days of Hand Coding Visualisations - Day 3
3 Days of Hand Coding Visualisations - Day 2
3 Days of Hand Coding Visualisations - Day 1
3 Days of Hand Coding Visualisations - Introduction