Skip to content

Commit

Permalink
Adapt algorithms with names starting with [e-i] (#34)
Browse files Browse the repository at this point in the history
* feat: adapt algorithms with names starting with [e-i]

* feat: fix eif version

* fix(eif): use older version of Cython to avoid incompatibilities
  • Loading branch information
CodeLionX authored Dec 4, 2023
1 parent d9f3ed8 commit fc258c3
Show file tree
Hide file tree
Showing 35 changed files with 94 additions and 64 deletions.
18 changes: 10 additions & 8 deletions eif/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Separate build image!
#----------------------------
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5 as build
FROM ghcr.io/timeeval/python3-base:0.3.0 as build

# install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends build-essential;
Expand All @@ -9,22 +9,24 @@ RUN python -m venv --system-site-packages /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# build and install dependencies
RUN pip install cython
COPY requirements.txt .
RUN pip install -r ./requirements.txt
RUN pip install cython==0.29.36
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt
#----------------------------

# inherit from the python3-base base image
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5 as runtime
FROM ghcr.io/timeeval/python3-base:0.3.0 as runtime

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

# specify the main entrypoint to your algorithm code
ENV ALGORITHM_MAIN="/app/algorithm.py"

ENV PATH="/opt/venv/bin:$PATH"

COPY --from=build /opt/venv /opt/venv

# add the algorithm code (in this case only a single file)
COPY algorithm.py .

ENV PATH="/opt/venv/bin:$PATH"
COPY algorithm.py /app/
COPY manifest.json /app/
2 changes: 1 addition & 1 deletion eif/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Extended Isolation Forest (EIF)",
"description": "Extenstion to the basic isolation forest. Implementation of https://doi.org/10.1109/TKDE.2019.2947676. Code from https://github.com/sahandha/eif",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "S. Hariri, M. Carrasco Kind, R. J. Brunner",
"type": "Detector",
"language": "Python",
Expand Down
2 changes: 1 addition & 1 deletion eif/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy
cython
pathlib
eif
eif==2.0.2
4 changes: 3 additions & 1 deletion encdec_ad/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.gitlab.hpi.de/akita/i/python3-torch:0.2.5
FROM ghcr.io/timeeval/python3-torch:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

Expand All @@ -9,4 +10,5 @@ COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY encdec_ad /app/encdec_ad
COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion encdec_ad/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "EncDec-AD",
"description": "Implementation of https://arxiv.org/pdf/1607.00148.pdf",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Pankaj Malhotra, Anusha Ramakrishnan, Gaurangi Anand, Lovekesh Vig, Puneet Agarwal, Gautam Shroff",
"language": "Python",
"type": "Detector",
Expand Down
4 changes: 3 additions & 1 deletion ensemble_gi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

COPY requirements.txt /app/
RUN pip install -r requirements.txt

COPY ensemble_gi /app/ensemble_gi
COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion ensemble_gi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Ensemble GI",
"description": "Implementation of https://doi.org/10.5441/002/edbt.2020.09",
"inputDimensionality": "univariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Yifeng Gao, Jessica Lin, Constantin Brif",
"language": "Python",
"type": "Detector",
Expand Down
4 changes: 3 additions & 1 deletion fast_mcd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

# install algorithm dependencies
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion fast_mcd/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Fast-MCD",
"description": "Implementation of https://doi.org/10.2307/1270566",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Peter J. Rousseeuw, Katrien Van Driessen",
"language": "Python",
"type": "Detector",
Expand Down
4 changes: 3 additions & 1 deletion fft/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

Expand All @@ -9,4 +10,5 @@ COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY fft /app/fft
COPY manifest.json /app/
COPY algorithm.py /app
2 changes: 1 addition & 1 deletion fft/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "FFT",
"description": "Implementation of https://dl.acm.org/doi/10.5555/1789574.1789615 proudly provided by members of the HPI AKITA project.",
"inputDimensionality": "univariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Faraz Rasheed, Peter Peng, Reda Alhajj, Jon Rokne",
"language": "Python",
"type": "Detector",
Expand Down
13 changes: 7 additions & 6 deletions generic_rf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY ./requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY ./algorithm.py .
COPY ./model.py .
COPY ./manifest.json .
COPY ./algorithm.py /app/
COPY ./model.py /app/
COPY ./manifest.json /app/
2 changes: 1 addition & 1 deletion generic_rf/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A generic windowed forecasting method using random forest regression (requested by RollsRoyce). The forecasting error is used as anomaly score.",
"inputDimensionality": "univariate",
"learningType": "semi-supervised",
"version": "0.1",
"version": "0.3.0",
"authors": "Sebastian Schmidl",
"language": "Python",
"type": "Detector",
Expand Down
13 changes: 7 additions & 6 deletions generic_xgb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

COPY ./requirements.txt .
RUN pip install -r requirements.txt
COPY ./requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY ./algorithm.py .
COPY ./model.py .
COPY ./manifest.json .
COPY ./algorithm.py /app/
COPY ./model.py /app/
COPY ./manifest.json /app/
2 changes: 1 addition & 1 deletion generic_xgb/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A generic windowed forecasting method using XGBoost regression (requested by RollsRoyce). The forecasting error is used as anomaly score.",
"inputDimensionality": "univariate",
"learningType": "semi-supervised",
"version": "0.1",
"version": "0.3.0",
"authors": "Sebastian Schmidl",
"language": "Python",
"type": "Detector",
Expand Down
6 changes: 4 additions & 2 deletions grammarviz3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gitlab.hpi.de/akita/dependency_proxy/containers/maven:3-openjdk-11-slim as build
FROM maven:3-openjdk-11-slim as build

WORKDIR /app

Expand All @@ -7,10 +7,12 @@ COPY src src
RUN mvn package -PsingleCLI -DskipTests


FROM registry.gitlab.hpi.de/akita/i/java-base:0.2.5
FROM ghcr.io/timeeval/java-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses="GPL-2.0"

ENV ALGORITHM_MAIN="/app/algorithm.jar"

COPY manifest.json /app/
COPY --from=build /app/target/grammarviz2-0.0.1-SNAPSHOT-jar-with-dependencies.jar ${ALGORITHM_MAIN}
2 changes: 1 addition & 1 deletion grammarviz3/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "GrammarViz",
"description": "Implementation of https://doi.org/10.1145/3051126.",
"inputDimensionality": "univariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Pavel Senin, Jessica Lin, Xing Wang, Tim Oates, Sunil Gandhi, Arnold P. Boedihardjo, Crystal Chen, Susan Frankenstein",
"language": "Java",
"type": "Detector",
Expand Down
6 changes: 4 additions & 2 deletions grammarviz3_multi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM gitlab.hpi.de/akita/dependency_proxy/containers/maven:3-openjdk-11-slim as build
FROM maven:3-openjdk-11-slim as build

COPY pom.xml /app/
COPY src /app/src
RUN cd /app && \
mvn package -PsingleCLI -DskipTests

FROM registry.gitlab.hpi.de/akita/i/java-base:0.2.5
FROM ghcr.io/timeeval/java-base:0.3.0

LABEL maintainer="[email protected];[email protected]"
LABEL org.opencontainers.image.licenses="GPL-2.0"

ENV ALGORITHM_MAIN="/app/algorithm.jar"

COPY manifest.json /app/
COPY --from=build /app/target/grammarviz2-0.0.1-SNAPSHOT-jar-with-dependencies.jar ${ALGORITHM_MAIN}
2 changes: 1 addition & 1 deletion grammarviz3_multi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "GrammarViz-Multivariate",
"description": "Multivariate extension of the GrammarViz3 algorithm.",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Yannik Schröder, Niklas Köhnecke",
"language": "Java",
"type": "Detector",
Expand Down
6 changes: 4 additions & 2 deletions hbos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/pyod:0.2.5
FROM ghcr.io/timeeval/pyod:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

# install algorithm dependencies
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY algorithm.py .
COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion hbos/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "HBOS",
"description": "Implementation of https://citeseerx.ist.psu.edu/viewdoc/citations;jsessionid=2B4E3FB2BB07448253B4D45C3DAC2E95?doi=10.1.1.401.5686.",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Markus Goldstein, Andreas Dengel",
"language": "Python",
"type": "Detector",
Expand Down
12 changes: 7 additions & 5 deletions health_esn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

COPY requirements.txt .
RUN pip install -r requirements.txt
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY health_esn ./health_esn
COPY algorithm.py .
COPY health_esn /app/health_esn/
COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion health_esn/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "HealthESN",
"description": "Implementation of https://doi.org/10.1007/s00521-018-3747-z",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Qing Chen, Anguo Zhang, Tingwen Huang, Qianping He, Yongduan Song",
"language": "Python",
"type": "Detector",
Expand Down
4 changes: 3 additions & 1 deletion hif/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses="GPL-2.0"

ENV ALGORITHM_MAIN="/app/algorithm.py"

# install algorithm dependencies
COPY requirements.txt /app/
RUN pip install -r /app/requirements.txt

COPY manifest.json /app/
COPY hif.py /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion hif/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Hybrid Isolation Forest (HIF)",
"description": "Implementation of https://arxiv.org/abs/1705.03800",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Pierre-Franccois Marteau, Saeid Soheily-Khah, Nicolas Bechet",
"language": "Python",
"type": "Detector",
Expand Down
12 changes: 7 additions & 5 deletions hotsax/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM registry.gitlab.hpi.de/akita/i/python3-base:0.2.5
FROM ghcr.io/timeeval/python3-base:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses="GPL-2.0"

ENV ALGORITHM_MAIN="/app/algorithm.py"

COPY requirements.txt .
COPY requirements.txt /app/
RUN set -eux; \
pip install --no-cache-dir -r requirements.txt; \
pip install --no-cache-dir -r /app/requirements.txt; \
find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
Expand All @@ -15,5 +16,6 @@ RUN set -eux; \
\) -exec rm -rf '{}' +; \
rm -rf /tmp/* /var/tmp/* ~/.cache/pip

COPY saxpy ./saxpy
COPY algorithm.py .
COPY saxpy /app/saxpy/
COPY manifest.json /app/
COPY algorithm.py /app/
2 changes: 1 addition & 1 deletion hotsax/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "HOT SAX",
"description": "Implementation of https://doi.org/10.1109/ICDM.2005.79.",
"inputDimensionality": "univariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Eamonn Keogh, Jessica Lin, Ada Fu",
"language": "Python",
"type": "Detector",
Expand Down
3 changes: 2 additions & 1 deletion hybrid_knn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.gitlab.hpi.de/akita/i/python3-torch:0.2.5
FROM ghcr.io/timeeval/python3-torch:0.3.0

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.licenses=MIT

ENV ALGORITHM_MAIN="/app/algorithm.py"

Expand Down
2 changes: 1 addition & 1 deletion hybrid_knn/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Hybrid KNN",
"description": "Implementation of https://www.hindawi.com/journals/cin/2017/8501683/",
"inputDimensionality": "multivariate",
"version": "0.1",
"version": "0.3.0",
"authors": "Hongchao Song, Zhuqing Jiang, Aidong Men, Bo Yang",
"language": "Python",
"type": "Detector",
Expand Down
Loading

0 comments on commit fc258c3

Please sign in to comment.