cc_py37.def 7.13 KB
Newer Older
1
BootStrap: docker
Martino Bertoni's avatar
Martino Bertoni committed
2
From: centos:8
3
4
5

%environment
    # PATHS
6
    export PATH=/opt/miniconda3/bin:$PATH
7
    source activate py37
8
9
10

%post
    # bind paths
Martino Bertoni's avatar
Martino Bertoni committed
11
12
13
14
15
16
    mkdir -p /aloy
    mkdir -p /aloy/home
    mkdir -p /aloy/data
    mkdir -p /aloy/scratch
    mkdir -p /aloy/web_checker
    mkdir -p /slgpfs
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    
    # update yum
    yum update -y

    # basic packages
    yum install -y gcc \
                   gcc-c++ \
                   gcc-gfortran \
                   cmake \
                   make \
                   git \
                   wget \
                   curl \
                   which \
                   vim \
                   bzip2 \
                   bzip2-devel \
                   file \
                   libXrender \
                   libXext \
                   postgresql-server \
Martino Bertoni's avatar
Martino Bertoni committed
38
                   postgresql-contrib \
39
                   epel-release 
Martino Bertoni's avatar
Martino Bertoni committed
40

Martino Bertoni's avatar
Martino Bertoni committed
41
    # MS compatible font for plotting 
42
    yum install -y xorg-x11-font-utils fontconfig libmspack
43
44
    rpm -i http://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/c/cabextract-1.5-1.el7.x86_64.rpm
    rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
45
46

    # conda
Martino Bertoni's avatar
Martino Bertoni committed
47
    mkdir -p /opt/miniconda3
48
49
50
51
52
53
54
    cd /opt/miniconda3 
    wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
    bash Miniconda3-latest-Linux-x86_64.sh -p /opt/miniconda3 -b -f
    rm Miniconda3-latest-Linux-x86_64.sh
    export PATH=/opt/miniconda3/bin:$PATH

    # create and activate conda enviroment
55
56
57
    conda update conda -y
    conda create --name=py37 python=3.7 -y
    source activate py37
58
59

    # conda-specific packages
Martino Bertoni's avatar
Martino Bertoni committed
60
61
    conda install -y -c rdkit rdkit               # Open-Source Cheminformatics Software
    conda install -y -c openbabel openbabel       # chemical toolbox
62
63
    conda install -y mkl-service                  # change the number of CPU’s MKL is using
    conda install -y anaconda-client              # client that provides an interface to Anaconda Cloud
Martino Bertoni's avatar
Martino Bertoni committed
64
65
    conda install -y -c pytorch faiss-cpu         # facebook trick for sparsity
    conda install -y -c conda-forge hdbscan       # clustering
66
67

    # utility packages
68
69
    pip install ipython                           # interactive python
    pip install jupyter                           # jupyter notebooks
70
71
    pip install six                               # py2/py3 compatibility
    pip install pytest                            # unit-testing
Martino Bertoni's avatar
Martino Bertoni committed
72
    pip install mock                              # mocking for unit-testing
73
74
75
76
77
78
79
80
81
82
    pip install autologging                       # logging handler
    pip install paramiko                          # ssh client
    pip install psycopg2-binary                   # Postgesql driver
    pip install sqlalchemy                        # ORM SQL
    pip install sphinx                            # to generate docs
    pip install sphinx_rtd_theme                  # docs theme.
    pip install patool                            # unzipping
    pip install wget                              # download library
    pip install timeout_decorator                 # method timeout
    pip install tqdm                              # handy progress-bar
83
84

    # raw data packages
Martino Bertoni's avatar
Martino Bertoni committed
85
    pip install lxml                              # xml parser
86
87
88
89
90
91
    pip install xlrd                              # Extract data from Excel spreadsheets
    pip install cmapPy                            # interacting with .gctx and .gct files, and other Connectivity Map resources
    pip install csvsort                           # Sort csv

    # chemistry packages
    #pip install e3fp                              # 3D molecular fingreprints
Oriol Guitart's avatar
Oriol Guitart committed
92
    pip install pubchempy                         # Pubchem rest api
Martino Bertoni's avatar
Martino Bertoni committed
93
    pip install chemfp                            # fast fingerprint search (used in TargetMate)
94
    pip install standardiser                      # standardising molecules
95

96
97
    # numerical packages
    pip install cython                            # C extensions
98
99
100
101
102
    pip install numpy                             # best numerical library ever
    pip install pandas                            # handles table-like datastracture
    pip install scipy                             # scientific python
    pip install theano                            # Optimize evaluate math expressions
    pip install h5py                              # HDF5 via python
103
104
105
    pip install fancyimpute                       # matrix completion and imputation algorithms
    pip install protobuf==3.6.1                   # Google serialization library
    #pip install intbitset                         # sort unsigned integers
106

107
108
    # graph packages
    pip install networkx                          # graph data stracture and algos
Martino Bertoni's avatar
Martino Bertoni committed
109
    pip install snap-stanford                     # Python interface for SNAP
110
111
112
113

    # visualization packages
    pip install matplotlib                        # chart library :)
    pip install seaborn                           # prettier graph built on top of matplotlib
Martino Bertoni's avatar
Martino Bertoni committed
114
    pip install datashader                        # plot huge 2D datasets (projetions)
115

116
117
118
    # ML packages
    pip install scikit-learn                      # entry level ML in python
    pip install gensim                            # topic modelling word2vec
119
    pip install tensorflow==1.14.0                # neural network library
120
    pip install adanet==0.5.0                     # automl for NN
121
    pip install keras                             # NN API
122
123

    # Dimensionality reduction
Martino Bertoni's avatar
Martino Bertoni committed
124
    pip install MulticoreTSNE                     # tSNE algo
125
    pip install umap-learn                        # UMAP algo
126
127

    # install local SBNB devpi packages
Martino Bertoni's avatar
Martino Bertoni committed
128
    DEVPI_HOST=gitlabsbnb.irbbarcelona.org
129
130
131
    DEVPI_PORT=3141
    alias sbnb_pip='pip install --index http://$DEVPI_HOST:$DEVPI_PORT/root/dev/ --trusted-host $DEVPI_HOST'
    sbnb_pip pqkmeans==1.0.4                      # slighty modified pqkmeans
132
133
134
135
136
137
    sbnb_pip pdbe-api                             # PDBe REST API
    sbnb_pip pride-api                            # PRIDE REST API
    sbnb_pip reactome-api                         # Reactome REST API
    sbnb_pip sbnb-dsysmap                         # access the sbnb-dsysmap database
    sbnb_pip sbnb-uniprotkb                       # interface to the local UniprotKB database
    sbnb_pip sbnb-util                            # utility code in the SBNB lab
138

Martino Bertoni's avatar
Martino Bertoni committed
139
140
    # chemical beauty QED
    curl -LO http://silicos-it.be.s3-website-eu-west-1.amazonaws.com/_downloads/qed-1.0.1.tar.gz
Martino Bertoni's avatar
Martino Bertoni committed
141
142
143
144
145
    mv qed-1.0.1.tar.gz /opt
    cd /opt
    tar -xvf qed-1.0.1.tar.gz
    cd qed-1.0.1
    2to3 silicos_it/descriptors/qed.py -w # very minor py3 compatibility issues (prints)
Martino Bertoni's avatar
Martino Bertoni committed
146
147
    python setup.py install

148
149
150
151
152
153
154
155
    # fix until is compatible with python 3.7
    cd /opt
    git clone https://github.com/keiserlab/e3fp.git
    cd e3fp/
    cython e3fp/fingerprint/metrics/_fast.pyx  # this is the fix
    python setup.py build_ext --inplace
    python setup.py install

156
157
    # APSW stands for Another Python SQLite Wrapper
    pip install https://github.com/rogerbinns/apsw/releases/download/3.24.0-r1/apsw-3.24.0-r1.zip --global-option=fetch --global-option=--version --global-option=3.24.0 --global-option=--all --global-option=build --global-option=--enable-all-extensions