Skip to content

Anaconda Installation – CentOS Cloud VM


This is just a custom guide to a INSTANCE on Google Cloud Platform, this could be more technical and advanced guide, if you do not understand or don’t know what you are doing, I kindly request you to take extreme caution. The components used here are billable. SKYDEVOPS/I/WE do not take any responsibility if the guide causes any serious damage or issues, which you have to take full responsibility.

Assuming that you have access to any cloud provider or any cloud instance like AWS, GCP, Rackspace, DigitalOcean, Linode etc. The instance used has the following specification.  This is the Guide to install and configure Anaconda Distribution for Data Science Projects. This guide is a part of Devops for Data Science

-==System Requirements==-

  • CPU: 64-bit 2.8 GHz
  • RAM: 4 GB (min)
  • Storage: 30 GB.
  • License: Free use & redistribution under the terms of Anaconda End User License.
  • OS: Windows 7,8,10, macOS 10.10+, or, Ubuntu, RedHat, CentOS 6+, and others.
  • System architecture: 64-bit x86, 32-bit x86 with Windows or Linux


  • Part-01: Creating a Instance on the Google Cloud Platform
  • Part-02: Installing and configuring Anaconda Distribution – Traditional
  • Part-03: Updating and Upgrading Anaconda Distribution
  • Part-04: Installing and configuring Anaconda in Docker Container
  • Part-05: Minimising the size of the Anaconda Docker Image
  • Part-06: Pushing the image to Docker Hub
  • Part-07: Automating the entire process using GitHub, Docker Hub

-== Part-01: Creating a Instance on the Google Cloud Platform ==-

Step-01: Name the Instance and select the Region and Zone

Step-02: Select the Machine Type

Step-03: Select the Boot Disk and Storage Options

Step-04: Select OS

Step-05: Verify the Instance

Step-06: Add the DNS configuration

Step-07: Login to the Server

Step-08: Install pre-requisites and update cache

Step-09: Verify the OS release

Step-10: Done – Setting up the instance is completed


 -== Part-02: Installing & configuring Anaconda – Traditional ==- 

Step-01: Download the Anaconda Python distribution

Step-02: Python 2.7.x will be used in this guide

Step-03: Create the directory structure for installation

Step-04: Install Anaconda Distribution

Step-05: Accept the License

Step-06: Select the Installation Path

Step-07: Add to the PATH variable

Step-08: Do not install VS Code

Step-09: Verify Anaconda installation


 -== Part-03: Updating and Upgrading Anaconda Distribution ==-

Step-01: Updating Conda

Step-02: Update Anaconda

Step-03: Update All Packages

Step-04: Testing Jupyter Notebooks


-== Part-04: Installing and configuring Anaconda in Docker Container ==-

Step-01: Installing Docker pre-requisites

Step-02: Add the Docker CE Repo

Step-03: Install Docker Community Edition

Step-04: Starting and Enabling Docker

$ sudo systemctl start docker
$ sudo systemctl enable docker

Step-05: Verifying docker installation

Step-06: Dockerfile

# Pre-Built Skydevops CentOS image
FROM skydevops/skydevops-centos7-ansible
LABEL maintainer=""

# Updating Centos packages and installing Anaconda
RUN yum update && yes|yum upgrade && \
yum install -y wget bzip2 && \
wget && \
bash -b && \

# Set path to conda
ENV PATH /root/anaconda2/bin:$PATH

# Configuring access to Jupyter
RUN mkdir /opt/notebooks \
jupyter notebook --generate-config --allow-root \
echo "c.NotebookApp.password = u'sha1:277aa1c52ca6:3a6f71c6f36fc191f238c07e5ca08878837e14f3'" >> /root/.jupyter/

# Jupyter listens port: 8888
# Run Jupyter notebook as Docker main process
CMD ["jupyter", "notebook", "--allow-root", "--notebook-dir=/opt/notebooks", "--ip='*'", "--port=8888", "--no-browser"]

Step-07: Create an image using the Dockerfile

$ docker build -t ds-skydevops .

Step-08: Building Image

Step-09: Installing Anaconda

Step-10: Creating Firewall Rule on GCP

Step-11: Firewall Details

Step-12: Assigning it to instance


Shashi View All

-== Superman ==-

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.