-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathversion-1.def
26 lines (25 loc) · 986 Bytes
/
version-1.def
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
Bootstrap: library
From: ubuntu:18.04
%post
# These first few commands allow us to find the python3-pip package later
# on.
apt-get update -y
# Using "noninteractive" mode runs apt-get while ensuring that there are
# no user prompts that would cause the `singularity build` command to hang.
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common
add-apt-repository universe
# Downloads the latest package lists (important).
apt-get update -y
# python3-tk is required by matplotlib.
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-tk \
python3-pip \
python3-distutils \
python3-setuptools
# Reduce the size of the image by deleting the package lists we downloaded,
# which are useless now.
rm -rf /var/lib/apt/lists/*
# Install Python modules.
pip3 install torch numpy matplotlib