cc_py37.def 5.87 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

Martino Bertoni's avatar
Martino Bertoni committed
9
10
11
12
%files
    #add node2vec pre-compiled binaries
    container/singularity/binaries/node2vec /opt

13
14
%post
    # bind paths
Martino Bertoni's avatar
Martino Bertoni committed
15
16
17
18
19
20
    mkdir -p /aloy
    mkdir -p /aloy/home
    mkdir -p /aloy/data
    mkdir -p /aloy/scratch
    mkdir -p /aloy/web_checker
    mkdir -p /slgpfs
21
22
23
24
    
    # update yum
    yum update -y

Martino Bertoni's avatar
Martino Bertoni committed
25
    # basic packages (~2 min)
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    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
42
                   postgresql-contrib \
43
                   epel-release 
Martino Bertoni's avatar
Martino Bertoni committed
44

Martino Bertoni's avatar
Martino Bertoni committed
45
    # MS compatible font for plotting (~3 min.)
46
    yum install -y xorg-x11-font-utils fontconfig libmspack
47
48
    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
49
50

    # conda
Martino Bertoni's avatar
Martino Bertoni committed
51
    mkdir -p /opt/miniconda3
52
53
54
55
56
57
58
    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
59
60
61
    conda update conda -y
    conda create --name=py37 python=3.7 -y
    source activate py37
62

Martino Bertoni's avatar
Martino Bertoni committed
63
    # conda-specific packages (~1 min)
64
65
66
67
68
69
    conda install -y -c rdkit rdkit                  # Open-Source Cheminformatics Software
    conda install -y -c openbabel openbabel          # chemical toolbox
    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
    conda install -y -c conda-forge hdbscan          # clustering
    conda install -y -c efelix fpsim2                # fast compound similarity searches (used in TargetMate)
Martino Bertoni's avatar
Martino Bertoni committed
70
    conda install -y -c conda-forge jupyterlab       # Jupyter notebooks
71
72
73
    conda install -y -c anaconda ipython">7.19"      # interactive python
    conda install -y -c anaconda cython              # C extensions
    conda install -y -c pytorch faiss-cpu            # efficient similarity search and clustering
74

Martino Bertoni's avatar
Martino Bertoni committed
75
    # utility packages (~2 min)
76
77
    pip install six                               # py2/py3 compatibility
    pip install pytest                            # unit-testing
Martino Bertoni's avatar
Martino Bertoni committed
78
    pip install mock                              # mocking for unit-testing
79
80
81
82
83
84
85
86
87
    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 tqdm                              # handy progress-bar
Martino Bertoni's avatar
Martino Bertoni committed
88
    pip install munch                             # dictionary that supports attribute-style access
89

90
    # raw data packages
Martino Bertoni's avatar
Martino Bertoni committed
91
    pip install lxml                              # xml parser
Martino Bertoni's avatar
Martino Bertoni committed
92
    pip install xlrd                              # Extract data from Excel spreadsheets
93
94
95
96
    pip install cmapPy                            # interacting with .gctx and .gct files, and other Connectivity Map resources
    pip install csvsort                           # Sort csv

    # chemistry packages
97
    pip install e3fp                              # 3D molecular fingreprints
Oriol Guitart's avatar
Oriol Guitart committed
98
    pip install pubchempy                         # Pubchem rest api
99
    pip install standardiser                      # standardising molecules
100
    pip install chembl_webresource_client         # Chembl API
101

102
103
104
    # ML packages
    pip install scikit-learn                      # entry level ML in python
    pip install gensim                            # topic modelling word2vec
Martino Bertoni's avatar
Martino Bertoni committed
105
106
107
    pip install tensorflow==2.3.1                 # neural network library
    pip install adanet                            # automl for NN
    pip install keras                             # NN API
108

109
    # numerical packages
110
111
    pip install numpy                             # best numerical library ever
    pip install pandas                            # handles table-like datastracture
112
    pip install openpyxl                          # open xlsx
113
114
    pip install scipy                             # scientific python
    pip install theano                            # Optimize evaluate math expressions
115
    pip install fancyimpute                       # matrix completion and imputation algorithms
Martino Bertoni's avatar
Martino Bertoni committed
116
    pip install protobuf                          # Google serialization library
117

118
119
    # graph packages
    pip install networkx                          # graph data stracture and algos
Martino Bertoni's avatar
Martino Bertoni committed
120
    pip install snap-stanford                     # Python interface for SNAP
121
122

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

127
    # Dimensionality reduction
Martino Bertoni's avatar
Martino Bertoni committed
128
    pip install MulticoreTSNE                     # tSNE algo
129
    pip install umap-learn                        # UMAP algo
130

Martino Bertoni's avatar
Martino Bertoni committed
131
    # Clone the chemical checker package (used as fallback)
Martino Bertoni's avatar
Martino Bertoni committed
132
    cd /opt
133
    git clone http://gitlabsbnb.irbbarcelona.org/packages/chemical_checker.git