cc_py37.def 5.93 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)
Martino Bertoni's avatar
Martino Bertoni committed
64
65
    conda install -y -c rdkit rdkit               # Open-Source Cheminformatics Software
    conda install -y -c openbabel openbabel       # chemical toolbox
66
67
    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
68
    conda install -y -c conda-forge hdbscan       # clustering
69
    conda install -y -c efelix fpsim2             # fast compound similarity searches (used in TargetMate)
70
    conda install -c anaconda ipython             # interactive python
71
72
    conda install -c conda-forge jupyterlab       # Jupyter notebooks

73

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

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

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

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

109
110
    # numerical packages
    pip install cython                            # C extensions
111
112
113
114
115
    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
116
    pip install fancyimpute                       # matrix completion and imputation algorithms
Martino Bertoni's avatar
Martino Bertoni committed
117
    pip install protobuf                          # Google serialization library
118

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

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

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

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

Martino Bertoni's avatar
Martino Bertoni committed
136
137
138
    # FIXES
    # fix numpy version issue
    conda install -y -c pytorch faiss-cpu