-
Notifications
You must be signed in to change notification settings - Fork 1
/
singularity.def
65 lines (53 loc) · 1.49 KB
/
singularity.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
Bootstrap: docker
From: tensorflow/tensorflow:2.8.0-gpu-jupyter
Stage: spython-base
%labels
maintainer="[email protected]"
%post
### DOCKER FILE DESCRIPTION
## Base image: Tensorflow - Cuda driver 11.2.0 with Ubuntu Focal (20.04);
## Softwares: Python3 (numpy, scipy, pandas, OpenCV, Gdal), Jupyter Lab
DEBIAN_FRONTEND=noninteractive
# Update & upgrade system
apt-get -y update && \
apt-get -y upgrade
apt-get install -y --no-install-recommends apt-utils
# Setup locales
apt-get install -y locales
echo LANG="en_US.UTF-8" > /etc/default/locale
LANG=C.UTF-8
LC_ALL=C.UTF-8
# Install Numpy, Scikit-learn, Pandas, Natsort
apt-get install -y --no-install-recommends \
python3-numpy \
python3-sklearn \
python3-pandas \
python3-natsort
# Install Gdal, Graphviz and Pydot (for tf.plot_model), OpenCV
apt-get -y update
apt-get install -y --no-install-recommends \
python3-gdal \
python3-graphviz \
python3-pydot \
python3-opencv
# Install Jupyterlab
pip install jupyterlab
# Install keras-tuner
pip install keras-tuner
# Install tensorflow_addons
pip install tensorflow_addons
JUPYTER_ENABLE_LAB=yes
PATH="$HOME/.local/bin:$PATH"
# Reduce image size
apt-get autoremove -y && \
apt-get clean -y
%environment
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export JUPYTER_ENABLE_LAB=yes
export PATH="$HOME/.local/bin:$PATH"
export TINI_VERSION=v0.18.0
%runscript
exec jupyter lab --port=8888 --no-browser --ip=0.0.0.0 --allow-root "$@"
%startscript
exec jupyter lab --port=8888 --no-browser --ip=0.0.0.0 --allow-root "$@"