Sign inSign up

rcsa/python3-base

By rcsa

•Updated over 8 years ago

Python 3.5 with HDF5, PyTables, Pandas, NumPy, SciPy & Sklearn installed

Image
3

1.6K

rcsa/python3-base repository overview

⁠Dockerfile for image rcsa/python3-base

⁠Update: I recommend using feather⁠ for persisting Pandas DataFrames instead of HDF5.

⁠Ingredients:

  • Python 3.5 (linked to update with official image)
  • HDF5 (quite cumbersome to install from source)
  • PyTables (requires HDF5 installed)
  • NumPy (compiling takes some time)
  • Pandas (requires pytables for hdf5-files and compiling takes some time)
  • SciPy, Scikit-Learn (quite cumbersome to install from source)

All taken care of...

⁠Build on top of this image with a Dockerfile like this:

FROM rcsa/python3-base:latest
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
ADD requirements.txt /code/
RUN pip install -r requirements.txt
ADD . /code/
CMD ["python", "run.py"]

⁠and app.py like this (see here⁠):

import pandas as pd
#persist dataframe
with pd.HDFStore('file.h5') as store:
    store['key'] = pd.DataFrame()
#load dataframe
with pd.HDFStore('file.h5') as store:
    df = store['key']

Tag summary

Content type

Image

Digest

sha256:f32975e1f…

Size

605 MB

Last updated

over 8 years ago

docker pull rcsa/python3-base