Skip to content

Commit 9fc1cb5

Browse files
committed
Compiling via mcc command, updates in readme
1 parent b562d9a commit 9fc1cb5

1 file changed

Lines changed: 30 additions & 14 deletions

File tree

ironclust-compiled/README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,46 @@ There are three main steps for generating a functional ironclust docker image:
2121

2222
Licenses for Matlab and toolboxes are needed only for compiling ironclust as Standalone Application and to generate the base Docker image. After this process, no license will be required, either to extend the base image or to run the sorter.
2323

24-
2524
## Compiling Ironclust as Matlab's Standalone Application
2625
- Git clone or Download ironclust [source code](https://github.com/flatironinstitute/ironclust.git)
2726
- Open Matlab
28-
- Set Matlab's workspace folder to: `<local-path-to-project>/ironclust/matlab`
29-
- Open Matlab's `Application Compiler` (located in `APPS` Tab)
30-
- Click on `+` sign in Add Main File, Select `p_ironclust.m` and Click Open
31-
- In the section `Files required for your application to run`, click on `+` sign button and Select all files (some might not be needed, but we haven't tested removing them), also select the following folders: `prb` and `prb_json`. Click Open
32-
- On Application Compiler window, Click on `Package`, Save the `p_ironclust.prj` file and wait for Matlab to Compile the project. A folder (named `p_ironclust` by default) with compiled files will be generated.
33-
27+
- Set Matlab's workspace folder to: `<git-cloned-path>/ironclust/matlab`
28+
- In Matlab console run:
29+
```
30+
>> mcc -m p_ironclust.m -a <git-cloned-path>/ironclust/matlab/*.* -a <git-cloned-path>/ironclust/matlab/prb -a <git-cloned-path>/ironclust/matlab/prb_json
31+
```
3432

3533
## Generating Base Docker Image
36-
- Close `Package` and `Application Compiler` windows
37-
- In Matlab console run:
34+
- To generate the base docker image (called `ironclust-matlab-base`) with the compiled application, run the following command in Matlab console:
3835
```
39-
compiler.package.docker('p_ironclust/for_testing/p_ironclust', 'p_ironclust/for_testing/requiredMCRProducts.txt', 'ImageName', 'ironclust-matlab-base')
36+
>> compiler.package.docker('p_ironclust', 'requiredMCRProducts.txt', 'ImageName', 'ironclust-matlab-base')
4037
```
41-
This command will create an image called `ironclust-matlab-base` to be used in the next step
38+
39+
- [Optional] Files generated by Matlab Compiler can be deleted:
40+
- In your terminal, go to the folder for this project:
41+
```
42+
$ cd <git-cloned-path>/ironclust/
43+
```
44+
- Run `rm` command:
45+
```
46+
$ rm -r \
47+
matlab/includedSupportPackages.txt \
48+
matlab/ironclust-matlab-basedocker \
49+
matlab/mccExcludedFiles.log \
50+
matlab/p_ironclust \
51+
matlab/readme.txt \
52+
matlab/requiredMCRProducts.txt \
53+
matlab/run_p_ironclust.sh \
54+
matlab/unresolvedSymbols.txt
55+
```
56+
4257

4358
## Extending Base Image/Creating final image
4459
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run ironclust:
4560

46-
- In your terminal, go to the current folder:
61+
- In your terminal, go to the folder for this project:
4762
```
48-
$ cd <local-path-to-project>/spikeinterface-dockerfiles/ironclust-compiled
63+
$ cd /path/to/spikeinterface-dockerfiles/ironclust-compiled
4964
```
5065

5166
- Run build script:
@@ -56,6 +71,8 @@ $ source build.sh
5671

5772
## Running a container
5873

74+
- [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#setting-up-nvidia-container-toolkit) is required to run a docker with GPU capabilities
75+
5976
The base syntax to run dockerized ironclust is:
6077

6178
```
@@ -68,4 +85,3 @@ Sample run:
6885
```
6986
docker run -v /home/user/data:/opt/data -it spikeinterface/ironclust p_ironclust /opt/data/tmp /opt/data/raw.mda /opt/data/geom.csv '' '' /opt/data/tmp/firing.mda /opt/data/argfile.txt
7087
```
71-

0 commit comments

Comments
 (0)