Skip to content

Commit

Permalink
Use Colab instead of Binder
Browse files Browse the repository at this point in the history
  • Loading branch information
dufkan committed Aug 3, 2023
1 parent b9da6ca commit 773dcb6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
15 changes: 3 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
FROM sagemath/sagemath:9.8

# Setup sage and jupyter
RUN sage --pip install --no-cache-dir notebook

# Conform to mybinder
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV HOME /home/sage
ENV TARGET "${HOME}/dissect"

USER root
RUN apt-get update && apt-get install ca-certificates
RUN usermod -l ${NB_USER} sage
COPY . ${TARGET}
RUN chown -R ${NB_UID} ${TARGET}
USER ${NB_USER}
RUN chown -R sage ${TARGET}
USER sage

# Install DiSSECT
WORKDIR ${TARGET}
ENV PATH "${HOME}/.sage/local/bin:${PATH}"
RUN sage --pip install --user .
RUN sed -i 's/^#!.*$/#!\/usr\/bin\/env sage/' ${HOME}/.sage/local/bin/dissect-*
ENTRYPOINT []
CMD ["sage", "-n", "jupyter", "dissect/analysis/playground.ipynb", "--ip='0.0.0.0'", "--port=8888"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://gitlab.fi.muni.cz/x408178/curve_analyzer/-/blob/master/LICENSE)
[![language](https://badgen.net/badge/language/python,sage/purple?list=/)](https://www.sagemath.org/)
[![traits](https://badgen.net/badge/traits/23/blue)](https://github.com/crocs-muni/DiSSECT/tree/master/dissect/traits)
[![Binder](https://static.mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/crocs-muni/DiSSECT/HEAD?labpath=dissect%2Fanalysis%2Fplayground.ipynb)
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/crocs-muni/DiSSECT/blob/master/dissect/analysis/playground.ipynb#offline=1)

DiSSECT is, to the best of our knowledge, the largest publicly available database of standardized elliptic curves (taken from our [sister project](https://neuromancer.sk/std/)) and offers generation of simulated curves according to the mentioned standards. The tool contains over 20 tests (which we call traits), each computing curve properties, ranging from classical algebraic ones to unconventional ones and those connected to implementations. After obtaining their empirical distributions, the traits allow us to compare the simulated curves to the standard ones. Finally, DiSSECT provides an easy-to-use interface for implementations of custom traits and their interactive visualization via Jupyter notebook.

Expand Down Expand Up @@ -36,7 +36,7 @@ When the image is successfully built, you can start using DiSSECT.
To run Jupyter Notebook, use the following command and access the provided link in your web browser.

```shell
docker run -it -p 8888:8888 dissect jupyter notebook dissect/analysis --ip='0.0.0.0' --port=8888
docker run -it -p 8888:8888 dissect
```

To use advanced components of DiSSECT, access the container directly.
Expand Down Expand Up @@ -96,7 +96,7 @@ To run analysis notebook, use the following command and select the `venv` kernel
```
jupyter notebook dissect/analysis/playground.ipynb
```
Alternatively, you may try using the notebook directly in your browser using [Binder](https://mybinder.org/v2/gh/crocs-muni/DiSSECT/HEAD?labpath=dissect%2Fanalysis%2Fplayground.ipynb).
Alternatively, you may try using the notebook directly in your browser using [Colab](https://colab.research.google.com/github/crocs-muni/DiSSECT/blob/master/dissect/analysis/playground.ipynb#offline=1).

### Automated analysis

Expand Down
9 changes: 7 additions & 2 deletions dissect/analysis/playground.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
"outputs": [],
"source": [
"# Import dependencies\n",
"from dissect.analysis.data_processing import get_curves, get_trait, find_outliers\n",
"import plotly.express as px"
"try:\n",
" from dissect.analysis.data_processing import get_curves, get_trait, find_outliers\n",
" import plotly.express as px\n",
"except:\n",
" %pip install git+https://github.com/crocs-muni/dissect\n",
" from dissect.analysis.data_processing import get_curves, get_trait, find_outliers\n",
" import plotly.express as px"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies = [
"pandas==2.0.3",
"scikit-learn==1.3.0",
"plotly==5.15.0",
"nbformat>=4.2.0",
]

[project.urls]
Expand Down

0 comments on commit 773dcb6

Please sign in to comment.