Newer
Older
# Instructions to install the DCT code
#
# Prerequisites:
# - python (version >= 2.6) www.python.org
# - git (version >= 1.6) www.git-scm.com
# - g++ (version >= 4.4) www.gcc.gnu.org
# - matlab (version >= 2012) www.mathworks.com
# - astra (version >= 1.0) www.code.google.com/p/astra-toolbox
# - cuda (version >= 4.0) www.nvidia.com/object/cuda_home_new.html
1. Download the DCT install bundle from:
http://sourceforge.net/projects/dct/
2. Extract the zip in a temporary directory (here it is /tmp)
user1@host1 ~/Downloads $ ls
dct-install.zip
user@host1 ~/Downloads $ unzip dct-install.zip -d /tmp
Archive: dct-install.zip
extracting: /tmp/dct-install/dct_compile_matlab_functions.py
extracting: /tmp/dct-install/dct_compile_mex_functions.py
extracting: /tmp/dct-install/dct_io_xml.py
extracting: /tmp/dct-install/dct_utils_git.py
extracting: /tmp/dct-install/dct_utils_platform.py
extracting: /tmp/dct-install/dct_matlab_invocation.py
extracting: /tmp/dct-install/dct_batch.py
extracting: /tmp/dct-install/dct_notification.py
extracting: /tmp/dct-install/dct_setup.py
user1@host1 ~/Downloads $ cd /tmp/dct-install
user1@host1 /tmp/dct-install $ ls
dct_compile_matlab_functions.py dct_setup.py
dct_compile_mex_functions.py dct_utils_git.py
dct_io_xml.py dct_utils_platform.py
dct_matlab_invocation.py
3. Then, run the python script to print help to install the code
(need python >= 2.6, so on rnice at ESRF, use python26 command)
user1@host1 /tmp/dct-install $ python dct_setup.py -h
Installs DCT for both users and developers
Options:
-h | --help : to show this help
-v | --verbose : to show more detailed output
-b <branch_name> : to select a specific branch from the listed here:
-d <dir_name> : to specify directory name, where dct will be
-u <user_name> : selects developer mode and specifies the developer
sf_username
-m <matlab_version> : selects the matlab version to be used
-mp <matlab_dir> : selects the path to matlab (not needed at ESRF)
4. Now you can run the installation with your personal settings. As a
user, you don't need to specify a user name (only for developers).
To install the stable_1.0 version in ~/dct_1.0 directory, let's run:
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
user1@host1 /tmp/dct-install $ python dct_setup.py -b stable_1.0 -d ~/dct_1.0
Checking system...
Done.
System information:
System Description: debian6 x86_64
Matlab Version: 2012a
Gcc Version: 4.4.5
Git Version: 1.7.2.5
Git repository information:
Mode: User
Branch: stable_1.0
DCT Dir: /users/user1/dct_1.0
Installing...
* Cloning repository...
Cloning into /users/user1/dct_1.0...
remote: Counting objects: 1978, done.
remote: Compressing objects: 100% (1632/1632), done.
remote: Total 1978 (delta 506), reused 1435 (delta 329)
Receiving objects: 100% (1978/1978), 26.10 MiB | 5.15 MiB/s, done.
Resolving deltas: 100% (506/506), done.
Done.
Initializing configuration files..
Creating new file: 'conf.xml'
New file path: /users/user1/dct_1.0/conf.xml
Updated '/users/user1/dct_1.0/conf.xml' with: 'matlab/version' <- '2012a'
Done.
Compiling MEX files..
[...]
Done.
Compiling batch functions... (may take several minutes)
[...]
Done.
DCT is now Installed in: '/users/user1/dct_1.0'
5. Using the dct_launch.py script with the proper argument, you can:
- run matlab with the DCT code [ matlab ] (works also with no arguments)
- update the code [ update ]
- update the configuration [ update_conf ]
- recompile mex functions [ compile_mex ] (sub-options, see --help)
- recompile matlab functions [ compile_matlab ] (sub-options, see --help)
- list all options [ -h | --help ]
$ python /users/user1/dct_1.0/dct_launch.py
6. Have fun with DCT!
7. Update regularly the code with "update" command and the configuration
with "update_conf" command.
8. Submit bug reports to https://sourceforge.net/p/dct/tickets
9. For more information or support, contact graintracking@esrf.fr