Skip to content

3.6 #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: 3.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
FROM alpine:3.8

LABEL MAINTAINER="Faizan Bashir <faizan.ibn.bashir@gmail.com>"
LABEL MAINTAINER="Thanh Nguyen <nguyenphuongthanhf@gmail.com>"

# Linking of locale.h as xlocale.h
# This is done to ensure successfull install of python numpy package
# see https://forum.alpinelinux.org/comment/690#comment-690 for more information.

WORKDIR /var/www/
# CREATE USER THE SAME UID AND WITH PARENT COMPUTER
ARG HOST_USER_UID=1000
ARG HOST_USER_GID=1000
ARG HOST_USER_NAME=www
ARG HOST_GROUP_NAME=www

RUN set -xe \
&& apk add --no-cache \
&& echo 'Creating notroot user and group from host' \
&& addgroup -g ${HOST_USER_GID} -S ${HOST_GROUP_NAME} \
&& adduser -u ${HOST_USER_UID} -D -S -G ${HOST_GROUP_NAME} ${HOST_USER_NAME}

RUN mkdir -p /app

WORKDIR /app

# SOFTWARE PACKAGES
# * musl: standard C library
Expand Down
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,62 @@
#Docker image for Python Datascience containers
## SOFTWARE PACKAGES
* musl: standard C library
* lib6-compat: compatibility libraries for glibc
* linux-headers: commonly needed, and an unusual package name from Alpine.
* build-base: used so we include the basic development packages (gcc)
* bash: so we can access /bin/bash
* git: to ease up clones of repos
* ca-certificates: for SSL verification during Pip and easy_install
* freetype: library used to render text onto bitmaps, and provides support font-related operations
* libgfortran: contains a Fortran shared library, needed to run Fortran
* libgcc: contains shared code that would be inefficient to duplicate every time as well as auxiliary helper routines and runtime support
* libstdc++: The GNU Standard C++ Library. This package contains an additional runtime library for C++ programs built with the GNU compiler
* openblas: open source implementation of the BLAS(Basic Linear Algebra Subprograms) API with many hand-crafted optimizations for specific processor types
* tcl: scripting language
* tk: GUI toolkit for the Tcl scripting language
* libssl1.0: SSL shared libraries

## PYTHON DATA SCIENCE PACKAGES
* numpy: support for large, multi-dimensional arrays and matrices
* matplotlib: plotting library for Python and its numerical mathematics extension NumPy.
* scipy: library used for scientific computing and technical computing
* scikit-learn: machine learning library integrates with NumPy and SciPy
* pandas: library providing high-performance, easy-to-use data structures and data analysis tools
* nltk: suite of libraries and programs for symbolic and statistical natural language processing for English


## Command
```
# For Python 2.7 pull
$ docker pull nguyenphuongthanhf/python-datascience:2.7
# For Python 3.6 pull
$ docker pull nguyenphuongthanhf/python-datascience:3.6
$ docker container run --rm -it nguyenphuongthanhf/python-datascience:3.6 python

$ docker container run --rm -it -v $(pwd):app nguyenphuongthanhf/python-datascience:latest python

$ docker container run -v $(pwd):/app --rm -it -u www nguyenphuongthanhf/python-datascience:latest sh

### create funny worker support

$ vi ~/.bashrc

### Add code
friday () {
tty=
tty -s && tty=--tty
docker run \
$tty \
--interactive \
--rm \
--volume $(pwd):/app \
--user $(id -u):$(id -g) \
--env SSH_AUTH_SOCK=$SSH_AUTH_SOCK \
nguyenphuongthanhf/python-datascience:latest python $@
}

### RUN

$ friday --version

```