-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSingularity
64 lines (50 loc) · 1.56 KB
/
Singularity
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
Bootstrap: docker
From: continuumio/miniconda3
%environment
DCMTK_PREFIX=/opt/dcmtk364
export DCMTK_PREFIX
PATH=$PATH:/opt/dcmtk364/bin:/opt/conda/bin
export PATH
%runscript
if [ $# -eq 0 ]; then
ls /opt/dcmtk364/bin
echo "You can issue any of the above commands to the container."
echo "singularity shell [image] and run python for pydicom."
exit 1
else
exec "$@"
fi
%post
apt-get update && apt-get install -y build-essential
apt-get install -y cmake
apt-get install -y wget
apt-get install -y vim
apt-get install -y libpng-dev
apt-get install -y libtiff5-dev
apt-get install -y libxml2-dev
apt-get install -y libjpeg62-turbo-dev
apt-get install -y zlib1g-dev
apt-get install -y libwrap0-dev
apt-get install -y libssl-dev
apt-get install -y dcm2niix
apt-get install -y pigz
mkdir /data
# Install pydicom
git clone https://www.github.com/pydicom/pydicom.git
cd pydicom && /opt/conda/bin/python setup.py install
# Install pynetdicom
cd ../ && git clone https://www.github.com/pydicom/pynetdicom3.git
cd pynetdicom3 && /opt/conda/bin/python setup.py install
DCMTK_PREFIX=/opt/dcmtk364
export DCMTK_PREFIX
# Releases are here http://dicom.offis.de/download/dcmtk/
wget http://dicom.offis.de/download/dcmtk/release/dcmtk-3.6.4.tar.gz
# Latest development release are here http://dicom.offis.de/download/dcmtk/snapshot/
# wget http://dicom.offis.de/download/dcmtk/snapshot/dcmtk-3.6.1_20170228.tar.gz
# unpack the archive
tar xzvf dcmtk-3.6.4.tar.gz
# go into the unpacked archive
cd dcmtk-3.6.4
cmake -DCMAKE_INSTALL_PREFIX=$DCMTK_PREFIX
make all
make install