You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kilosort_no_license/README.md
+19-69Lines changed: 19 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,6 @@
1
-
# Kilosort3 Docker Image
1
+
# Kilosort Compiled Docker Images
2
2
3
-
This documentation is intended to show how to create a Docker image with Matlab compiled implementation of Kilosort3 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 kilosort
4
-
5
-
There are four main steps to generate a functional kilosort3-compiled docker image:
6
-
7
-
1. Kilosort Setup
8
-
2. Compile Kilosort3 as Standalone Application
9
-
3. Create a (base) docker image with Matlab Runtime and the compiled application from step 2
10
-
4. Extend the docker image from step 3 for improvements and fixes
3
+
This documentation is intended to show how to create a Docker image with Matlab compiled implementation of Kilosort 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 kilosort
11
4
12
5
## Requirements
13
6
- Packaging a MATLAB Docker image is supported on Linux only
@@ -21,78 +14,35 @@ There are four main steps to generate a functional kilosort3-compiled docker ima
21
14
- Signal Processing Toolbox
22
15
- Statistics and Machine Learning Toolbox
23
16
24
-
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.
25
-
26
-
## Kilosort Setup
27
-
- Git clone or Download kilosort [source code](https://github.com/MouseLand/Kilosort)
28
-
- Open Matlab
29
-
- Compile Kilosort mexfiles:
30
-
- Set Matlab's workspace folder to `<git-cloned-path>/Kilosort/CUDA`
31
-
- In Matlab console run:
32
-
```matlab
33
-
>> mexGPUall
34
-
```
35
-
36
-
## Compiling Kilosort as Matlab's Standalone Application
37
-
- Set Matlab's workspace folder to `/path/to/spikeinterface-dockerfiles/kilosort3-compiled/matlab_files`
38
-
- Run `mcc` command with `utils` folder and kilosort path:
39
-
```
40
-
>> mcc -m ks3_compiled.m -a utils -a <git-cloned-path>/Kilosort
41
-
```
42
-
43
-
## Generating Base Docker Image
44
-
- To generate the base docker image (called `ks3-matlab-base`) with the compiled application, run the following command in Matlab console:
-[Optional] Files generated by Matlab Compiler can be deleted:
50
-
- In your terminal, go to the folder for this project:
51
-
```
52
-
$ cd /path/to/spikeinterface-dockerfiles/kilosort3-compiled
53
-
```
54
-
- Run `rm` command:
55
-
```
56
-
$ rm -r \
57
-
matlab_files/includedSupportPackages.txt \
58
-
matlab_files/ks3-matlab-basedocker/ \
59
-
matlab_files/ks3_compiled \
60
-
matlab_files/mccExcludedFiles.log \
61
-
matlab_files/readme.txt \
62
-
matlab_files/requiredMCRProducts.txt \
63
-
matlab_files/run_ks3_compiled.sh \
64
-
matlab_files/unresolvedSymbols.txt
65
-
```
17
+
## Creating Docker Image
66
18
67
-
## Extending Base Image and creating final image
68
-
The Dockerfile in this folder applies some fixes and updates to the base image generated automatically by Matlab in order to properly run kilosort3:
19
+
There are four main steps to generate a functional kilosort-compiled docker image:
69
20
70
-
- In your terminal, go to the folder for this project:
71
-
```
72
-
$ cd /path/to/spikeinterface-dockerfiles/kilosort3-compiled
73
-
```
21
+
1. Kilosort Setup
22
+
2. Compile Kilosort as Standalone Application
23
+
3. Create a (base) docker image with Matlab Runtime and the compiled application from step 2
24
+
4. Extend the docker image from step 3 for improvements and fixes
74
25
75
-
- Run build script:
76
-
```
77
-
$ source build.sh
78
-
```
26
+
Detailed descriptions for each step are documented in `README.md` for each supported kilosort version folder (`kilosort-compiled`, `kilosort2-compiled` and so on)
79
27
28
+
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.
80
29
81
30
## Running a container
82
31
83
-
-[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
32
+
After generating kilosort-compiled image,[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
84
33
85
34
The base syntax to run dockerized kilosort is:
86
35
36
+
```bash
37
+
docker run -v <host-data-folder>:<docker-data-folder><image>:<tag><ks_command> [ARGS]
87
38
```
88
-
docker run -v <host-data-folder>:<docker-data-folder> -it spikeinterface/kilosort3-compiled-base:0.1.0 ks3_compiled [ARGS]
89
-
```
90
-
91
-
Notice that a volume has to be binded to a folder were all the data to run kilosort3 are stored
92
-
93
-
Currently the only ARG option is the folder where the data are stored (\<docker-data-folder\>)
39
+
- A volume has to be binded to a folder were all the data to run kilosort are stored
40
+
-`<image>`: Image name given by `build.sh` script
41
+
-`<tag>`: Image Tag given by `build.sh` script
42
+
-`<ks_command>`: Depends on kilosort version, options are `ks_compiled`, `ks2_compiled`, `ks2_5_compiled` or `ks3_compiled`
43
+
-`[ARGS]`: Currently the only ARG option is the folder where the data are stored (\<docker-data-folder\>)
94
44
95
-
This kilosort3 compiled version assumes that there are also two `.mat` files in this data folder:
45
+
This kilosort compiled version assumes that there are also two `.mat` files in this data folder:
0 commit comments