Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9032f58

Browse filesBrowse files
committed
add scipy-3
1 parent 5ec5914 commit 9032f58
Copy full SHA for 9032f58

File tree

7 files changed

+162
-0
lines changed
Filter options

7 files changed

+162
-0
lines changed

‎scipy/3/Dockerfile

Copy file name to clipboard
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# consult: https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices
2+
# Forked: https://github.com/CHECK24/docker.alpine.scipy
3+
FROM phirov/pandas:0.19-3
4+
MAINTAINER phirov@163.com
5+
6+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
7+
#RUN echo "http://nl.alpinelinux.org/alpine/v3.4/main" > /etc/apk/repositories
8+
9+
COPY libs/* /tmp/
10+
11+
RUN apk update && \
12+
apk add --no-cache --virtual .build-deps \
13+
g++ \
14+
ca-certificates \
15+
openntpd \
16+
build-base \
17+
musl-dev \
18+
gfortran \
19+
libgfortran && \
20+
# Build BLAS and LAPACK
21+
source /tmp/blas.sh && \
22+
source /tmp/lapack.sh && \
23+
# Install cython, numpy, pandas, scipy
24+
export BLAS=~/src/BLAS/libfblas.a && \
25+
export LAPACK=~/src/lapack-3.5.0/liblapack.a && \
26+
#pip3 install numpy==1.12.0 cython==0.25.2 && \
27+
#pip3 install pandas==0.19.2 && \
28+
pip3 install scipy==0.18.1 && \
29+
# Clean up
30+
mv ~/src/BLAS/libfblas.a /tmp/ && \
31+
mv ~/src/lapack-3.5.0/liblapack.a /tmp/ && \
32+
rm -rf ~/src && \
33+
mkdir -p ~/src/BLAS ~/src/lapack-3.5.0 && \
34+
mv /tmp/libfblas.a ~/src/BLAS/libfblas.a && \
35+
mv /tmp/liblapack.a ~/src/lapack-3.5.0/liblapack.a && \
36+
rm -rf /tmp/* && \
37+
rm -rf ~/.cache/pip && \
38+
# Remove all the extra build stuff
39+
apk del build-base "*-dev" && \
40+
apk del .build-deps
41+
42+

‎scipy/3/README.md

Copy file name to clipboard
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Alpine based Dockerimage for Python with SciPy-stack
2+
3+
This image is base on [CHECK24](https://github.com/CHECK24/docker.alpine.scipy)
4+
or [catholabs](https://github.com/catholabs/docker-alpine)
5+
6+
This repository contains a Dockerfile for building a python ready image
7+
that is running based on Alpine 3.4 and Python 2.7
8+
9+
It provides the following python libaries
10+
11+
- scipy (0.18.1)
12+
13+
To build the image execute the following command:
14+
15+
```
16+
./deploy.sh
17+
```
18+
19+
To test scipy you've to enter the following command:
20+
21+
```
22+
./debug.sh
23+
```
24+

‎scipy/3/libs/blas.sh

Copy file name to clipboard
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
mkdir -p ~/src/
3+
cd ~/src/
4+
mv /tmp/blas.tgz .
5+
tar xzf blas.tgz
6+
cd BLAS
7+
gfortran -O3 -std=legacy -m64 -fno-second-underscore -fPIC -c *.f
8+
ar r libfblas.a *.o
9+
ranlib libfblas.a
10+
rm -rf *.o
11+
export BLAS=~/src/BLAS/libfblas.a

‎scipy/3/libs/blas.tgz

Copy file name to clipboard
97.6 KB
Binary file not shown.

‎scipy/3/libs/lapack.sh

Copy file name to clipboard
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env sh
2+
mkdir -p ~/src/
3+
cd ~/src/
4+
mv /tmp/lapack.tgz .
5+
tar xzf lapack.tgz
6+
cd lapack-3.5.0/
7+
cp /tmp/make.inc .
8+
make lapacklib -j$(cat /proc/cpuinfo | grep 'processor' | wc -l)
9+
make clean
10+
export LAPACK=~/src/lapack-3.5.0/liblapack.a

‎scipy/3/libs/lapack.tgz

Copy file name to clipboard
6.02 MB
Binary file not shown.

‎scipy/3/libs/make.inc

Copy file name to clipboard
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
####################################################################
2+
# LAPACK make include file. #
3+
# LAPACK, Version 3.5.0 #
4+
# November 2013 #
5+
####################################################################
6+
#
7+
SHELL = /bin/sh
8+
#
9+
# Modify the FORTRAN and OPTS definitions to refer to the
10+
# compiler and desired compiler options for your machine. NOOPT
11+
# refers to the compiler options desired when NO OPTIMIZATION is
12+
# selected. Define LOADER and LOADOPTS to refer to the loader and
13+
# desired load options for your machine.
14+
#
15+
FORTRAN = gfortran
16+
OPTS = -O2 -fPIC
17+
DRVOPTS = $(OPTS)
18+
NOOPT = -O0 -fPIC
19+
LOADER = gfortran
20+
LOADOPTS =
21+
#
22+
# Timer for the SECOND and DSECND routines
23+
#
24+
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
25+
#TIMER = EXT_ETIME
26+
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
27+
# TIMER = EXT_ETIME_
28+
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
29+
TIMER = INT_ETIME
30+
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
31+
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
32+
# TIMER = INT_CPU_TIME
33+
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
34+
# TIMER = NONE
35+
#
36+
# Configuration LAPACKE: Native C interface to LAPACK
37+
# To generate LAPACKE library: type 'make lapackelib'
38+
# Configuration file: turned off (default)
39+
# Complex types: C99 (default)
40+
# Name pattern: mixed case (default)
41+
# (64-bit) Data model: LP64 (default)
42+
#
43+
# CC is the C compiler, normally invoked with options CFLAGS.
44+
#
45+
CC = gcc
46+
CFLAGS = -O3
47+
#
48+
# LAPACKE has also the interface to some routines from tmglib,
49+
# if LAPACKE_WITH_TMG is selected, we need to add those routines to LAPACKE
50+
#LAPACKE_WITH_TMG = Yes
51+
#
52+
# The archiver and the flag(s) to use when building archive (library)
53+
# If you system has no ranlib, set RANLIB = echo.
54+
#
55+
ARCH = ar
56+
ARCHFLAGS= cr
57+
RANLIB = ranlib
58+
#
59+
# Location of the extended-precision BLAS (XBLAS) Fortran library
60+
# used for building and testing extended-precision routines. The
61+
# relevant routines will be compiled and XBLAS will be linked only if
62+
# USEXBLAS is defined.
63+
#
64+
# USEXBLAS = Yes
65+
XBLASLIB =
66+
# XBLASLIB = -lxblas
67+
#
68+
# The location of the libraries to which you will link. (The
69+
# machine-specific, optimized BLAS library should be used whenever
70+
# possible.)
71+
#
72+
BLASLIB = ../../librefblas.a
73+
LAPACKLIB = liblapack.a
74+
TMGLIB = libtmglib.a
75+
LAPACKELIB = liblapacke.a

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.