Skip to content

Commit 6f77761

Browse files
authored
Merge pull request #1 from ruivieira/main
Initial commit of examples
2 parents 05bce68 + c39f5d6 commit 6f77761

File tree

7 files changed

+2181
-1
lines changed

7 files changed

+2181
-1
lines changed

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM python:3.9.6-slim-buster
2+
3+
# work-around on Debian JDK install bug
4+
RUN mkdir -p /usr/share/man/man1
5+
RUN apt-get update
6+
RUN apt-get install -y cmake openjdk-11-jdk-headless maven build-essential wget
7+
8+
COPY . .
9+
RUN pip3 install --no-cache-dir -r requirements.txt && \
10+
pip3 install --no-cache-dir -r requirements-dev.txt
11+
12+
# Install the python-trustyai bindings
13+
RUN python3 setup.py install
14+
15+
USER root
16+
17+
ENV NB_USER jovyan
18+
ENV NB_UID 1000
19+
ENV HOME /home/$NB_USER
20+
21+
RUN adduser --disabled-password \
22+
--gecos "Default user" \
23+
--uid $NB_UID \
24+
$NB_USER
25+
26+
COPY . $HOME
27+
RUN chown -R $NB_UID $HOME
28+
29+
USER $NB_USER
30+
31+
WORKDIR $HOME
32+
33+
RUN mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get \
34+
-DremoteRepositories=https://repository.sonatype.org/content/repositories/central \
35+
-Dartifact=org.kie.kogito:explainability-core:1.8.0.Final \
36+
-Dmaven.repo.local=dep -q && \
37+
wget -O ./dep/org/kie/kogito/explainability-core/1.8.0.Final/explainability-core-1.8.0.Final-tests.jar \
38+
https://repo1.maven.org/maven2/org/kie/kogito/explainability-core/1.8.0.Final/explainability-core-1.8.0.Final-tests.jar
39+
40+
# Launch the notebook server
41+
WORKDIR $HOME/examples
42+
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
# examples
1+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/trustyai-python/examples/main)
2+
# trustyai-examples
3+
4+
Examples for the Python bindings to [TrustyAI](https://kogito.kie.org/trustyai/)'s explainability library.
5+
6+
## Binder
7+
8+
You can run the example Jupyter notebooks using `mybinder.org`:
9+
10+
- https://mybinder.org/v2/gh/trustyai-python/examples/main
11+
12+
13+
The Jupyter notebooks examples available are:
14+
15+
- [Counterfactual explanations](examples/Counterfactuals.ipynb)
16+
* [LIME explanations](examples/Lime.ipynb)

0 commit comments

Comments
 (0)