-
Notifications
You must be signed in to change notification settings - Fork 0
/
keras-py3.def
72 lines (62 loc) · 2.32 KB
/
keras-py3.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
BootStrap: docker
From: nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
%help
base recipe: https://github.com/NIH-HPC/singularity-examples
#---------------------------------------------------------------------
%labels
#---------------------------------------------------------------------
MAINTAINER Jongsu Kim
#---------------------------------------------------------------------
%environment
#---------------------------------------------------------------------
export CUDA_PATH=/usr/local/cuda
export PATH=$CUDA_PATH/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export LD_LIBRARY_PATH=$CUDA_PATH/lib64:/usr/lib/x86_64-linux-gnu:/lib:/lib64
#---------------------------------------------------------------------
%post
#---------------------------------------------------------------------
export DEBIAN_FRONTEND=noninteractive
# select mirror
apt-get update
apt-get install -y --no-install-recommends python3-dev python3-pip python3-setuptools python3-wheel
pip3 install --upgrade pip
python3 -m pip install --upgrade setuptools wheel
python3 -m pip install apt-mirror-updater
apt-mirror-updater --auto-change-mirror
# pkg
apt-get update
apt-get install -y libhdf5-dev locales tzdata python3-tk
apt-get install -y chromium-browser
apt-get clean
# locales
locale-gen --purge en_US.UTF-8
#echo "LC_ALL=en_US.UTF-8" >> /etc/environment
#echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
#echo "LANG=en_US.UTF-8" > /etc/locale.conf
#locale-gen en_US.UTF-8
echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US:en"\n' > /etc/default/locale
dpkg-reconfigure locales
# TZ
export TZ="Asia/Seoul"
ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime
echo ${TZ} > /etc/timezone
dpkg-reconfigure tzdata --frontend noninteractive tzdata
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/serial/
# basic numerical tools
python3 -m pip install numpy scipy matplotlib
# machine learning libraries
python3 -m pip install tensorflow-gpu scikit-learn keras
# jupyter notebook
python3 -m pip install notebook ipython
# IO
python3 -m pip install openpyxl h5py pandas tables
# geodata
python3 -m pip install geopy pytz chardet networkx folium geopandas
# images
python3 -m pip install Pillow
# web
python3 -m pip install selenium requests
# test
python3 -m pip install tox pytest coverage
# create some generic mount points
mkdir -p /mnt/data /mnt/input /mnt/output /mnt/ref /mnt/code /mnt/work