-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingularity.python
More file actions
48 lines (38 loc) · 1.5 KB
/
Copy pathSingularity.python
File metadata and controls
48 lines (38 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Bootstrap: docker
From: ubuntu:16.04
%labels
Maintainer Matthew Flister
Version v1.0
%help
# Add information describing your container.
This container includes Python.
%environment
# Set useful environment variables here. This section is used only at runtime, not during build.
export PATH=/opt/python/bin:$PATH
export LD_LIBRARY_PATH=/opt/python/lib:$LD_LIBRARY_PATH
%post
# Add build commands here. These commands are only run at build time.
# Create useful bind points for needed file systems. The following are set by default in RCC and should always be included for containers used in RCC.
mkdir -p /scratch/global /scratch/local /rcc/stor1/refdata /rcc/stor1/projects /rcc/stor1/depts
# Install necessary packages.
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gcc-multilib \
ca-certificates \
zlib1g-dev \
libssl-dev \
curl
apt-get clean
rm -rf /var/lib/apt/lists/*
# Install Python from source.
export PATH=/opt/python/bin:$PATH
curl https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz -o Python-2.7.15.tgz
tar -xvf Python-2.7.15.tgz && cd Python-2.7.15
./configure --prefix=/opt/python && make && make install
rm -rf Python-2.7.15*
# Install pip package manager.
curl https://bootstrap.pypa.io/get-pip.py | python
# Install some useful Python packages.
pip install --upgrade numpy scipy matplotlib
%test
/opt/python/bin/python --version