Setting Up Docker for Python

Mar 28, 2019


These steps are based on Python for Finance. As I am going through the exercises in the book, I am documenting these steps here for future references.

Log into Docker container:

docker run -ti -h py4fi -p 11111:11111 ubuntu:latest /bin/bash

Run these commands inside the Docker container:

apt-get update; apt-get upgrade -y
apt-get install -y bzip2 gcc wget

// Conda is package manager for Python
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh

bash miniconda.sh

// reload bash with conda in PATH and run update
bash
conda update -y conda python
conda install -y ipython matplotlib pandas pytables scikit-learn  scipy