Skip to content

Commit

Permalink
add conda and docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxiaoh committed Mar 3, 2018
1 parent c7c20bf commit b33ffca
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 1 deletion.
20 changes: 20 additions & 0 deletions conda/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Install script for Anaconda environments on macOS and linux.
# This script is not supposed to be called directly, but should be run by:
#
# $ cd <path to ideep, e.g. ~/ideep>
# $ conda build conda
#
#
# If you're debugging this, it may be useful to use the env that conda build is
# using:
# $ cd <anaconda_root>/conda-bld/ideep_<timestamp>
# $ source activate _h_env_... # some long path with lots of placeholders
#
# Also, failed builds will accumulate those ideep_<timestamp> directories. You
# can remove them after a succesfull build with
# $ conda build purge
#
cd python
python setup.py install
12 changes: 12 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
protobuf:
- 3.4.1
numpy:
- 1.13

pin_run_as_build:
protobuf:
min_pin: x.x
max_pin: x.x
numpy:
min_pin: x.x
max_pin: x.x
47 changes: 47 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% set version = "1.0.3" %}

package:
name: ideep4py
version: {{ version }}

source:
path: ../

build:
number: 0
skip: True # [win]

requirements:
build:
- cmake
- git
- curl
- pcre
- setuptools
- numpy
- gflags
- opencv
- python
- protobuf
- six
- openssl
run:
- cmake
- git
- curl
- pcre
- setuptools
- numpy
- gflags
- opencv
- protobuf
- python
- six
- openssl

test:
imports:
- ideep4py

about:
license: MIT
55 changes: 55 additions & 0 deletions docker/python2/Dockerfile_centos
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM centos:7

USER root

RUN yum -y install epel-release &&\
yum upgrade -y

RUN yum install -y \
redhat-rpm-config \
cmake \
git \
wget \
ssh \
gcc-c++ \
boost-devel \
gflags-devel \
glog-devel \
hdf5-devel \
opencv-devel \
protobuf-devel \
liblapack-dev \
libssl-dev \
protobuf-compiler \
python-devel \
python-numpy \
python-pip \
python-setuptools \
openssl \
gcc-gfortran \
pcre \
pcre-devel

RUN yum clean all


RUN mkdir Downloads && \
cd Downloads && \
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
tar -xf swig-3.0.12.tar.gz && \
cd swig-3.0.12/ && \
./configure && \
make -j && \
make install && \
cd ../../


RUN pip install --default-timeout=10000 six \
h5py \
nose \
protobuf \
Pillow \
filelock


RUN pip install ideep4py
52 changes: 52 additions & 0 deletions docker/python2/Dockerfile_ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM ubuntu:16.04


RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
vim \
ssh \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libopencv-dev \
libprotobuf-dev \
liblapack-dev \
libssl-dev \
protobuf-compiler \
python-dev \
python-numpy \
python-pip \
python-setuptools \
openssl \
curl && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*


RUN mkdir Downloads && \
cd Downloads && \
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
tar -xf swig-3.0.12.tar.gz && \
cd swig-3.0.12/ && \
./configure && \
make -j && \
make install && \
cd ../../

RUN pip install --upgrade pip setuptools

RUN pip install --default-timeout=10000 wheel \
six \
h5py \
nose \
protobuf \
Pillow \
filelock \
distribute


RUN pip install ideep4py
68 changes: 68 additions & 0 deletions docker/python3/Dockerfile_centos
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM centos:7

USER root


RUN yum -y install epel-release &&\
yum upgrade -y

RUN yum install -y \
redhat-rpm-config \
cmake \
git \
wget \
ssh \
gcc-c++ \
boost-devel \
gflags-devel \
glog-devel \
hdf5-devel \
protobuf-devel \
liblapack-dev \
libssl-dev \
protobuf-compiler \
openssl \
openssl-devel \
bzip2-devel \
expat-devel \
gdbm-devel \
readline-devel \
sqlite-devel \
gcc-gfortran \
pcre \
pcre-devel \

RUN yum clean all


RUN mkdir Downloads && \
cd Downloads && \
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz && \
tar -zxvf Python-3.5.2.tgz && \
cd Python-3.5.2 && \
./configure --prefix=/usr/local/python3.5 --enable-optimizations && \
make -j && \
make install && \
ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3 && \
ln -s /usr/local/python3.5/bin/pip3.5 /usr/bin/pip3 && \
cd ../


RUN wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
tar -xf swig-3.0.12.tar.gz && \
cd swig-3.0.12/ && \
./configure && \
make -j && \
make install && \
cd ../../


RUN pip3 install --default-timeout=10000 six \
h5py \
nose \
protobuf \
Pillow \
filelock


RUN pip3 install ideep4py
50 changes: 50 additions & 0 deletions docker/python3/Dockerfile_ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM ubuntu:16.04


RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
ssh \
libboost-all-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libopencv-dev \
libprotobuf-dev \
liblapack-dev \
libssl-dev \
protobuf-compiler \
python3-dev \
python3-numpy \
python3-pip \
python3-setuptools \
openssl \
curl && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

RUN mkdir Downloads && \
cd Downloads && \
wget https://nchc.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz && \
tar -xf swig-3.0.12.tar.gz && \
cd swig-3.0.12/ && \
./configure && \
make -j && \
make install && \
cd ../../

RUN pip3 install --upgrade pip setuptools

RUN pip3 install --default-timeout=10000 wheel \
six \
h5py \
nose \
protobuf \
Pillow \
filelock \
distribute


RUN pip3 install ideep4py
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def run(self):

setup(
name='ideep4py',
version='1.0.2',
version='1.0.3',
description='ideep4py is a wrapper for iDeep library.',
author='Intel',
author_email='',
Expand Down

0 comments on commit b33ffca

Please sign in to comment.