Skip to content

Commit ac6da0a

Browse files
committed
Add compile script, remove matlab file - hdsort
1 parent 689e7c0 commit ac6da0a

4 files changed

Lines changed: 40 additions & 58 deletions

File tree

hdsort-compiled/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM hdsort-matlab-base
22

3-
RUN chmod 755 /usr/bin/mlrtapp/hdsort_compiled
3+
RUN chmod 755 /usr/bin/mlrtapp/hdsort_master
44
ENV PATH="/usr/bin/mlrtapp:${PATH}"
55

66
RUN apt-get update -y

hdsort-compiled/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ There are three main steps for generating a functional HDsort docker image:
1414

1515
### Matlab Requirements
1616
- MATLAB Compiler
17+
- Fuzzy_Logic Toolbox
1718
- More requirements to be checked and listed...
1819

1920
## Compiling HDsort as Matlab's Standalone Application

hdsort-compiled/compile.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if [ $# == 0 ]; then
5+
echo "Usage: $0 param1 param2"
6+
echo "* param1: hdsort path"
7+
echo "* param2: spikeinterface path"
8+
exit
9+
fi
10+
11+
if [ $# -ne 2 ]; then
12+
echo "spikeinterface and hdsort path must be given"
13+
exit 1
14+
fi
15+
16+
WC_PATH=$1
17+
SI_PATH=$2
18+
WORK_DIR=$(pwd)
19+
SOURCE_DIR=$( dirname -- "$0"; )
20+
TMP_DIR=$SOURCE_DIR/tmp
21+
22+
echo "hdsort path: ${WC_PATH}"
23+
echo "spike-interface path: ${SI_PATH}"
24+
25+
echo "Creating tmp folder: $TMP_DIR"
26+
cd $WORK_DIR
27+
mkdir -p $TMP_DIR
28+
29+
echo "Compiling hdsort_master..."
30+
cd $TMP_DIR
31+
matlab -batch "mcc -m ${SI_PATH}/spikeinterface/sorters/hdsort/hdsort_master.m -a ${SI_PATH}/spikeinterface/sorters/utils -a ${WC_PATH}"
32+
33+
echo "Creating base docker image..."
34+
matlab -batch "compiler.package.docker('hdsort_master', 'requiredMCRProducts.txt', 'ImageName', 'hdsort-matlab-base')"
35+
36+
cd $WORK_DIR
37+
rm -r $TMP_DIR
38+

hdsort-compiled/hdsort_compiled.m

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)