Installing Superset docker on an Ubuntu 16.04 EC2 instance

Dheeraj Inampudi
2 min readApr 3, 2019

It's so surprising that I didn’t find any article that helps me to install superset on an Ubuntu 16.04 AMI of AWS EC2 instance. So, I have decided to do it myself. In this approach, I tried to install a Docker container by following superset’s cloud-native installation procedure. In my future articles, I will be installing superset build node version running on WSGI HTTP Apache or Gunicorn server.

Following are the steps I followed to successfully install superset in DEBUG mode on a default port 8080.

Step 1: Start Ubuntu 16.04 AMI instance on t2.large(optional)

Step 2: SSH into the instance by using pem key

$ ssh -i "*****.pem" ubuntu@ec2-*-**-***-***.compute-1.amazonaws.com

Step 3: create a superset folder and clone superset repo into it

$mkdir superset
$cd superset
$git clone https://github.com/apache/incubator-superset/
$cd incubator-superset/contrib/docker

Step 4: installing docker-compose

Use the following commands to install the latest docker compose that is compatible with superset. I tried to do sudo install docker-compose and pip install docker-compose but both failed with the superset docker configuration. The below curl installation from the official docker documentation helped me to resolve the version dependency issue.

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose#change the permissions
$ sudo chmod +x /usr/bin/docker-compose

Step 5: initiating docker compose

# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
$ sudo docker-compose run --rm superset ./docker-init.sh

Step 6: Starting the containers

# you can run this command everytime you need to start superset now:
$ sudo docker-compose up

Step 7: Allow external traffic in the security groups by enabling all traffic in the inbounds

After several minutes for superset initialization to finish, you can open a browser and view http://<EC2 Public DNS>:8080 to start your journey.

--

--

Dheeraj Inampudi

Talks about AI & ML Engineering, Data Science, AWS and SaaS