Skip to content

Commit b33ffca

Browse files
committed
add conda and docker
1 parent c7c20bf commit b33ffca

File tree

8 files changed

+305
-1
lines changed

8 files changed

+305
-1
lines changed

conda/build.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Install script for Anaconda environments on macOS and linux.
4+
# This script is not supposed to be called directly, but should be run by:
5+
#
6+
# $ cd <path to ideep, e.g. ~/ideep>
7+
# $ conda build conda
8+
#
9+
#
10+
# If you're debugging this, it may be useful to use the env that conda build is
11+
# using:
12+
# $ cd <anaconda_root>/conda-bld/ideep_<timestamp>
13+
# $ source activate _h_env_... # some long path with lots of placeholders
14+
#
15+
# Also, failed builds will accumulate those ideep_<timestamp> directories. You
16+
# can remove them after a succesfull build with
17+
# $ conda build purge
18+
#
19+
cd python
20+
python setup.py install

conda/conda_build_config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
protobuf:
2+
- 3.4.1
3+
numpy:
4+
- 1.13
5+
6+
pin_run_as_build:
7+
protobuf:
8+
min_pin: x.x
9+
max_pin: x.x
10+
numpy:
11+
min_pin: x.x
12+
max_pin: x.x

conda/meta.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{% set version = "1.0.3" %}
2+
3+
package:
4+
name: ideep4py
5+
version: {{ version }}
6+
7+
source:
8+
path: ../
9+
10+
build:
11+
number: 0
12+
skip: True # [win]
13+
14+
requirements:
15+
build:
16+
- cmake
17+
- git
18+
- curl
19+
- pcre
20+
- setuptools
21+
- numpy
22+
- gflags
23+
- opencv
24+
- python
25+
- protobuf
26+
- six
27+
- openssl
28+
run:
29+
- cmake
30+
- git
31+
- curl
32+
- pcre
33+
- setuptools
34+
- numpy
35+
- gflags
36+
- opencv
37+
- protobuf
38+
- python
39+
- six
40+
- openssl
41+
42+
test:
43+
imports:
44+
- ideep4py
45+
46+
about:
47+
license: MIT

docker/python2/Dockerfile_centos

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM centos:7
2+
3+
USER root
4+
5+
RUN yum -y install epel-release &&\
6+
yum upgrade -y
7+
8+
RUN yum install -y \
9+
redhat-rpm-config \
10+
cmake \
11+
git \
12+
wget \
13+
ssh \
14+
gcc-c++ \
15+
boost-devel \
16+
gflags-devel \
17+
glog-devel \
18+
hdf5-devel \
19+
opencv-devel \
20+
protobuf-devel \
21+
liblapack-dev \
22+
libssl-dev \
23+
protobuf-compiler \
24+
python-devel \
25+
python-numpy \
26+
python-pip \
27+
python-setuptools \
28+
openssl \
29+
gcc-gfortran \
30+
pcre \
31+
pcre-devel
32+
33+
RUN yum clean all
34+
35+
36+
RUN mkdir Downloads && \
37+
cd Downloads && \
38+
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
39+
tar -xf swig-3.0.12.tar.gz && \
40+
cd swig-3.0.12/ && \
41+
./configure && \
42+
make -j && \
43+
make install && \
44+
cd ../../
45+
46+
47+
RUN pip install --default-timeout=10000 six \
48+
h5py \
49+
nose \
50+
protobuf \
51+
Pillow \
52+
filelock
53+
54+
55+
RUN pip install ideep4py

docker/python2/Dockerfile_ubuntu

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
FROM ubuntu:16.04
2+
3+
4+
RUN apt-get update -y && \
5+
apt-get install -y --no-install-recommends \
6+
build-essential \
7+
cmake \
8+
git \
9+
wget \
10+
vim \
11+
ssh \
12+
libboost-all-dev \
13+
libgflags-dev \
14+
libgoogle-glog-dev \
15+
libhdf5-serial-dev \
16+
libopencv-dev \
17+
libprotobuf-dev \
18+
liblapack-dev \
19+
libssl-dev \
20+
protobuf-compiler \
21+
python-dev \
22+
python-numpy \
23+
python-pip \
24+
python-setuptools \
25+
openssl \
26+
curl && \
27+
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
28+
29+
30+
RUN mkdir Downloads && \
31+
cd Downloads && \
32+
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
33+
tar -xf swig-3.0.12.tar.gz && \
34+
cd swig-3.0.12/ && \
35+
./configure && \
36+
make -j && \
37+
make install && \
38+
cd ../../
39+
40+
RUN pip install --upgrade pip setuptools
41+
42+
RUN pip install --default-timeout=10000 wheel \
43+
six \
44+
h5py \
45+
nose \
46+
protobuf \
47+
Pillow \
48+
filelock \
49+
distribute
50+
51+
52+
RUN pip install ideep4py

docker/python3/Dockerfile_centos

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
FROM centos:7
2+
3+
USER root
4+
5+
6+
RUN yum -y install epel-release &&\
7+
yum upgrade -y
8+
9+
RUN yum install -y \
10+
redhat-rpm-config \
11+
cmake \
12+
git \
13+
wget \
14+
ssh \
15+
gcc-c++ \
16+
boost-devel \
17+
gflags-devel \
18+
glog-devel \
19+
hdf5-devel \
20+
protobuf-devel \
21+
liblapack-dev \
22+
libssl-dev \
23+
protobuf-compiler \
24+
openssl \
25+
openssl-devel \
26+
bzip2-devel \
27+
expat-devel \
28+
gdbm-devel \
29+
readline-devel \
30+
sqlite-devel \
31+
gcc-gfortran \
32+
pcre \
33+
pcre-devel \
34+
35+
RUN yum clean all
36+
37+
38+
RUN mkdir Downloads && \
39+
cd Downloads && \
40+
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz && \
41+
tar -zxvf Python-3.5.2.tgz && \
42+
cd Python-3.5.2 && \
43+
./configure --prefix=/usr/local/python3.5 --enable-optimizations && \
44+
make -j && \
45+
make install && \
46+
ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3 && \
47+
ln -s /usr/local/python3.5/bin/pip3.5 /usr/bin/pip3 && \
48+
cd ../
49+
50+
51+
RUN wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
52+
tar -xf swig-3.0.12.tar.gz && \
53+
cd swig-3.0.12/ && \
54+
./configure && \
55+
make -j && \
56+
make install && \
57+
cd ../../
58+
59+
60+
RUN pip3 install --default-timeout=10000 six \
61+
h5py \
62+
nose \
63+
protobuf \
64+
Pillow \
65+
filelock
66+
67+
68+
RUN pip3 install ideep4py

docker/python3/Dockerfile_ubuntu

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
FROM ubuntu:16.04
2+
3+
4+
RUN apt-get update -y && \
5+
apt-get install -y --no-install-recommends \
6+
build-essential \
7+
cmake \
8+
git \
9+
wget \
10+
ssh \
11+
libboost-all-dev \
12+
libgflags-dev \
13+
libgoogle-glog-dev \
14+
libhdf5-serial-dev \
15+
libopencv-dev \
16+
libprotobuf-dev \
17+
liblapack-dev \
18+
libssl-dev \
19+
protobuf-compiler \
20+
python3-dev \
21+
python3-numpy \
22+
python3-pip \
23+
python3-setuptools \
24+
openssl \
25+
curl && \
26+
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
27+
28+
RUN mkdir Downloads && \
29+
cd Downloads && \
30+
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
31+
tar -xf swig-3.0.12.tar.gz && \
32+
cd swig-3.0.12/ && \
33+
./configure && \
34+
make -j && \
35+
make install && \
36+
cd ../../
37+
38+
RUN pip3 install --upgrade pip setuptools
39+
40+
RUN pip3 install --default-timeout=10000 wheel \
41+
six \
42+
h5py \
43+
nose \
44+
protobuf \
45+
Pillow \
46+
filelock \
47+
distribute
48+
49+
50+
RUN pip3 install ideep4py

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def run(self):
167167

168168
setup(
169169
name='ideep4py',
170-
version='1.0.2',
170+
version='1.0.3',
171171
description='ideep4py is a wrapper for iDeep library.',
172172
author='Intel',
173173
author_email='',

0 commit comments

Comments
 (0)