Skip to content

Commit 0090fb2

Browse files
committed
update docs
1 parent ac6da0a commit 0090fb2

8 files changed

Lines changed: 65 additions & 238 deletions

File tree

hdsort-compiled/README.md

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# HDsort Compiled Docker Images
1+
# HDsort Compiled Docker Image
22

33
This documentation is intended to show how to create a Docker image with Matlab compiled HDsort sorter. The main goal of this project is to avoid the requirement of Matlab Licenses and also abstract the installation and setup steps to run the sorter
44

55
There are three main steps for generating a functional HDsort docker image:
66
1. Compile HDsort as Matlab's Standalone Application
7-
2. Create a (base) docker image with Matlab Runtime and the compiled application from step 1
7+
2. Create a base docker image with Matlab Runtime and the compiled application from step 1
88
3. Extend the docker image from step 2 for improvements and fixes
99

10+
Steps 1 and 2 are done by `compile.sh` script, while step 3 is done by `build.sh` script
11+
1012
## Requirements
1113
- Packaging a MATLAB Docker image is supported on Linux only
1214
- Docker
@@ -17,45 +19,19 @@ There are three main steps for generating a functional HDsort docker image:
1719
- Fuzzy_Logic Toolbox
1820
- More requirements to be checked and listed...
1921

20-
## Compiling HDsort as Matlab's Standalone Application
22+
## Cloning repositories
2123
- Git clone or Download HDsort [source code](https://git.bsse.ethz.ch/hima_public/HDsort)
22-
- Open Matlab
23-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/hdsort-compiled`
24-
- Run `mcc` command with `hdsort_compiled.m` as base and adding path to git cloned HDSort:
25-
```matlab
26-
>> mcc -m hdsort_compiled.m -a <git-cloned-path>/HDsort
27-
```
24+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
2825

2926
## Generating Base Docker Image
30-
- To generate the base docker image (called `hdsort-matlab-base`) with the compiled application, run the following command in Matlab console:
31-
```matlab
32-
>> compiler.package.docker('hdsort_compiled', 'requiredMCRProducts.txt', 'ImageName', 'hdsort-matlab-base')
27+
`compile.sh` script generates the base docker image (called `hdsort-matlab-base`) with the matlab compiled HDSort application
28+
- Run compile script:
29+
```bash
30+
$ source compile.sh /path/to/HDSort /path/to/spikeinterface
3331
```
3432

35-
36-
- [Optional] Files generated by Matlab Compiler can be deleted:
37-
- In your terminal, go to the `hdsort-compiled` folder in this project:
38-
```bash
39-
$ cd /path/to/spikeinterface-dockerfiles/hdsort-compiled
40-
```
41-
42-
- Run `rm` command:
43-
```bash
44-
$ rm -r \
45-
hdsort-matlab-basedocker \
46-
hdsort_compiled \
47-
includedSupportPackages.txt \
48-
mccExcludedFiles.log \
49-
readme.txt \
50-
requiredMCRProducts.txt \
51-
run_hdsort_compiled.sh \
52-
unresolvedSymbols.txt
53-
```
54-
55-
5633
## Extending Base Image and creating final image
57-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run waveclus:
58-
34+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run HDSort:
5935

6036
- In your terminal, go to the folder for this project:
6137
```

ironclust-compiled/README.md

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This documentation is intended to show how to create a Docker image with Matlab
44

55
There are three main steps for generating a functional ironclust docker image:
66
1. Compile Ironclust as Matlab's Standalone Application
7-
2. Create a (base) docker image with Matlab Runtime and the compiled application from step 1
7+
2. Create a base docker image with Matlab Runtime and the compiled application from step 1
88
3. Extend the docker image from step 2 for improvements and fixes
99

1010
## Requirements
@@ -21,42 +21,20 @@ 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-
## Compiling Ironclust as Matlab's Standalone Application
24+
## Cloning repositories
2525
- Git clone or Download ironclust [source code](https://github.com/flatironinstitute/ironclust.git)
26-
- Open Matlab
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-
```
26+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
27+
3228

3329
## Generating Base Docker Image
34-
- To generate the base docker image (called `ironclust-matlab-base`) with the compiled application, run the following command in Matlab console:
35-
```
36-
>> compiler.package.docker('p_ironclust', 'requiredMCRProducts.txt', 'ImageName', 'ironclust-matlab-base')
30+
`compile.sh` script generates the base docker image (called `ironclust-matlab-base`) with the matlab compiled ironclust application
31+
- Run compile script:
32+
```bash
33+
$ source compile.sh /path/to/ironclust /path/to/spikeinterface
3734
```
3835

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-
57-
5836
## Extending Base Image/Creating final image
59-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run ironclust:
37+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run ironclust:
6038

6139
- In your terminal, go to the folder for this project:
6240
```
@@ -68,7 +46,6 @@ $ cd /path/to/spikeinterface-dockerfiles/ironclust-compiled
6846
$ source build.sh
6947
```
7048

71-
7249
## Running a container
7350

7451
- [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

kilosort_no_license/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ This documentation is intended to show how to create a Docker image with Matlab
1818

1919
There are four main steps to generate a functional kilosort-compiled docker image:
2020

21-
1. Kilosort Setup
21+
1. Compile Kilosort CUDA files
2222
2. Compile Kilosort as Standalone Application
2323
3. Create a (base) docker image with Matlab Runtime and the compiled application from step 2
2424
4. Extend the docker image from step 3 for improvements and fixes
2525

26-
Detailed descriptions for each step are documented in `README.md` for each supported kilosort version folder (`kilosort-compiled`, `kilosort2-compiled` and so on)
26+
Steps 1 to 3 are done by `compile.sh` script, while step 4 is done by `build.sh` script.
27+
28+
Steps to run scripts and create the images are documented in `README.md` for each supported kilosort version folder (`kilosort-compiled`, `kilosort2-compiled` and so on)
2729

2830
Licenses for Matlab and toolboxes are needed only for compiling kilosort 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.
2931

kilosort_no_license/kilosort-compiled/README.md

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,18 @@
22

33
## 1. Kilosort Setup
44
- Git clone or Download Kilosort [source code](https://github.com/cortex-lab/KiloSort)
5-
- Open Matlab
6-
- Compile Kilosort mexfiles:
7-
- Set Matlab's workspace folder to `<git-cloned-path>/KiloSort/CUDA`
8-
- In Matlab console run:
9-
```matlab
10-
>> mexGPUall
11-
```
5+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
126

13-
## 2. Compiling Kilosort as Matlab's Standalone Application
14-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/kilosort_no_license`
15-
- Run `mcc` command with `utils` folder and kilosort path:
16-
```matlab
17-
>> mcc -m kilosort-compiled/ks_compiled.m -a utils -a <git-cloned-path>/KiloSort
18-
```
19-
20-
## 3. Generating Base Docker Image
21-
- To generate the base docker image (called `ks-matlab-base`) with the compiled application, run the following command in Matlab console:
22-
```matlab
23-
>> compiler.package.docker('ks_compiled', 'requiredMCRProducts.txt', 'ImageName', 'ks-matlab-base')
7+
## 2. Create base image
8+
`compile.sh` script generates the base docker image (called `ks2-matlab-base`) with the matlab compiled Kilosort application
9+
- Run compile script:
10+
```bash
11+
$ source compile.sh /path/to/KiloSort /path/to/spikeinterface
2412
```
2513

26-
- [Optional] Files generated by Matlab Compiler can be deleted:
27-
- In your terminal, go to the `kilosort_no_license` folder in this project:
28-
```bash
29-
$ cd /path/to/spikeinterface-dockerfiles/kilosort_no_license
30-
```
31-
- Run `rm` command:
32-
```bash
33-
$ rm -r \
34-
includedSupportPackages.txt \
35-
ks-matlab-basedocker/ \
36-
ks_compiled \
37-
mccExcludedFiles.log \
38-
readme.txt \
39-
requiredMCRProducts.txt \
40-
run_ks_compiled.sh \
41-
unresolvedSymbols.txt
42-
```
43-
44-
## 4. Extending Base Image and creating final image
14+
## 3. Extending Base Image and creating final image
4515

46-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run kilosort:
16+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run kilosort:
4717

4818
- In your terminal, go to the folder for this project:
4919
```bash

kilosort_no_license/kilosort2-compiled/README.md

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,19 @@
11
# Generating Compiled Kilosort2 Docker Image
22

3-
## 1. Kilosort Setup
4-
- Git clone or Download Kilosort [source code](https://github.com/MouseLand/Kilosort)
5-
- Git checkout to the correct version:
6-
```bash
7-
$ git checkout tags/v2.0
8-
```
9-
- Open Matlab
10-
- Compile Kilosort mexfiles:
11-
- Set Matlab's workspace folder to `<git-cloned-path>/Kilosort/CUDA`
12-
- In Matlab console run:
13-
```matlab
14-
>> mexGPUall
15-
```
16-
17-
## 2. Compiling Kilosort as Matlab's Standalone Application
18-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/kilosort_no_license`
19-
- Run `mcc` command with `utils` folder and kilosort path:
20-
```matlab
21-
>> mcc -m kilosort2-compiled/ks2_compiled.m -a utils -a <git-cloned-path>/Kilosort
22-
```
3+
## 1. Kilosort Setup
4+
- Git clone or Download kilosort [source code](https://github.com/MouseLand/Kilosort)
5+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
236

24-
## 3. Generating Base Docker Image
25-
- To generate the base docker image (called `ks2-matlab-base`) with the compiled application, run the following command in Matlab console:
26-
```matlab
27-
>> compiler.package.docker('ks2_compiled', 'requiredMCRProducts.txt', 'ImageName', 'ks2-matlab-base')
7+
## 2. Create base image
8+
`compile.sh` script generates the base docker image (called `ks2-matlab-base`) with the matlab compiled Kilosort2 application
9+
- Run compile script:
10+
```bash
11+
$ source compile.sh /path/to/Kilosort /path/to/spikeinterface
2812
```
2913

30-
- [Optional] Files generated by Matlab Compiler can be deleted:
31-
- In your terminal, go to the `kilosort_no_license` folder in this project:
32-
```bash
33-
$ cd /path/to/spikeinterface-dockerfiles/kilosort_no_license
34-
```
35-
- Run `rm` command:
36-
```bash
37-
$ rm -r \
38-
includedSupportPackages.txt \
39-
ks2-matlab-basedocker/ \
40-
ks2_compiled \
41-
mccExcludedFiles.log \
42-
readme.txt \
43-
requiredMCRProducts.txt \
44-
run_ks2_compiled.sh \
45-
unresolvedSymbols.txt
46-
```
47-
48-
## 4. Extending Base Image and creating final image
14+
## 3. Extending Base Image and creating final image
4915

50-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run kilosort2:
16+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run kilosort2:
5117

5218
- In your terminal, go to the folder for this project:
5319
```bash

kilosort_no_license/kilosort2_5-compiled/README.md

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,19 @@
11
# Generating Compiled Kilosort2_5 Docker Image
22

3-
## 1. Kilosort Setup
4-
- Git clone or Download Kilosort [source code](https://github.com/MouseLand/Kilosort)
5-
- Git checkout to the correct version:
6-
```bash
7-
$ git checkout tags/v2.5
8-
```
9-
- Open Matlab
10-
- Compile Kilosort mexfiles:
11-
- Set Matlab's workspace folder to `<git-cloned-path>/Kilosort/CUDA`
12-
- In Matlab console run:
13-
```matlab
14-
>> mexGPUall
15-
```
16-
17-
## 2. Compiling Kilosort as Matlab's Standalone Application
18-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/kilosort_no_license`
19-
- Run `mcc` command with `utils` folder and kilosort path:
20-
```matlab
21-
>> mcc -m kilosort2_5-compiled/ks2_5_compiled.m -a utils -a <git-cloned-path>/Kilosort
22-
```
3+
## 1. Setup
4+
- Git clone or Download kilosort [source code](https://github.com/MouseLand/Kilosort)
5+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
236

24-
## 3. Generating Base Docker Image
25-
- To generate the base docker image (called `ks2_5-matlab-base`) with the compiled application, run the following command in Matlab console:
26-
```matlab
27-
>> compiler.package.docker('ks2_5_compiled', 'requiredMCRProducts.txt', 'ImageName', 'ks2_5-matlab-base')
7+
## 2. Create base image
8+
`compile.sh` script generates the base docker image (called `ks2_5-matlab-base`) with the matlab compiled Kilosort2_5 application
9+
- Run compile script:
10+
```bash
11+
$ source compile.sh /path/to/Kilosort /path/to/spikeinterface
2812
```
2913

30-
- [Optional] Files generated by Matlab Compiler can be deleted:
31-
- In your terminal, go to the `kilosort_no_license` folder in this project:
32-
```bash
33-
$ cd /path/to/spikeinterface-dockerfiles/kilosort_no_license
34-
```
35-
- Run `rm` command:
36-
```bash
37-
$ rm -r \
38-
includedSupportPackages.txt \
39-
ks2_5-matlab-basedocker/ \
40-
ks2_5_compiled \
41-
mccExcludedFiles.log \
42-
readme.txt \
43-
requiredMCRProducts.txt \
44-
run_ks2_5_compiled.sh \
45-
unresolvedSymbols.txt
46-
```
47-
48-
## 4. Extending Base Image and creating final image
14+
## 3. Extending Base Image and creating final image
4915

50-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run kilosort2_5:
16+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run kilosort2_5:
5117

5218
- In your terminal, go to the folder for this project:
5319
```bash

kilosort_no_license/kilosort3-compiled/README.md

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,19 @@
11
# Generating Compiled Kilosort3 Docker Image
22

3-
## 1. Kilosort Setup
4-
- Git clone or Download Kilosort [source code](https://github.com/MouseLand/Kilosort)
5-
- Open Matlab
6-
- Compile Kilosort mexfiles:
7-
- Set Matlab's workspace folder to `<git-cloned-path>/Kilosort/CUDA`
8-
- In Matlab console run:
9-
```matlab
10-
>> mexGPUall
11-
```
3+
## 1. Kilosort Setup
4+
- Git clone or Download kilosort [source code](https://github.com/MouseLand/Kilosort)
5+
- Git clone or Download spikeinterface [source code](https://github.com/SpikeInterface/spikeinterface)
126

13-
## 2. Compiling Kilosort as Matlab's Standalone Application
14-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/kilosort_no_license`
15-
- Run `mcc` command with `utils` folder and kilosort path:
16-
```matlab
17-
>> mcc -m kilosort3-compiled/ks3_compiled.m -a utils -a <git-cloned-path>/Kilosort
18-
```
19-
20-
## 3. Generating Base Docker Image
21-
- To generate the base docker image (called `ks3-matlab-base`) with the compiled application, run the following command in Matlab console:
22-
```matlab
23-
>> compiler.package.docker('ks3_compiled', 'requiredMCRProducts.txt', 'ImageName', 'ks3-matlab-base')
7+
## 2. Create base image
8+
`compile.sh` script generates the base docker image (called `ks3-matlab-base`) with the matlab compiled Kilosort3 application
9+
- Run compile script:
10+
```bash
11+
$ source compile.sh /path/to/Kilosort /path/to/spikeinterface
2412
```
2513

26-
- [Optional] Files generated by Matlab Compiler can be deleted:
27-
- In your terminal, go to the `kilosort_no_license` folder in this project:
28-
```bash
29-
$ cd /path/to/spikeinterface-dockerfiles/kilosort_no_license
30-
```
31-
- Run `rm` command:
32-
```bash
33-
$ rm -r \
34-
includedSupportPackages.txt \
35-
ks3-matlab-basedocker/ \
36-
ks3_compiled \
37-
mccExcludedFiles.log \
38-
readme.txt \
39-
requiredMCRProducts.txt \
40-
run_ks3_compiled.sh \
41-
unresolvedSymbols.txt
42-
```
43-
44-
## 4. Extending Base Image and creating final image
14+
## 3. Extending Base Image and creating final image
4515

46-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run kilosort3:
16+
The Dockerfile in this folder applies some fixes and updates to the base image in order to properly run kilosort3:
4717

4818
- In your terminal, go to the folder for this project:
4919
```bash

0 commit comments

Comments
 (0)