Skip to content

Commit a58b822

Browse files
notebook fix so they run on binder
1 parent 96aed0d commit a58b822

File tree

4 files changed

+47
-2331
lines changed

4 files changed

+47
-2331
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use github pages for docker image
2-
FROM ghcr.io/ingeborggjerde/graphnics:v0.3.0
2+
FROM ghcr.io/ingeborggjerde/graphnics:v0.4.0
33

44
# Create user with a home directory
55
ARG NB_USER

demo/Graphnics demo.ipynb

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 53,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
9+
"# If running in binder you need to install graphnics\n",
10+
"# Just uncomment the lines below and run this cell\n",
11+
"\n",
12+
"#! cd .. && python3 -m pip install -e . && cd demo \n",
13+
"#from IPython.core.display import HTML \n",
14+
"#HTML(\"<script>Jupyter.notebook.kernel.restart()</script>\") \n"
15+
]
16+
},
17+
{
18+
"cell_type": "code",
19+
"execution_count": null,
20+
"metadata": {},
21+
"outputs": [],
22+
"source": [
23+
"\n",
24+
"\n",
925
"from fenics import *\n",
1026
"import sys\n",
1127
"sys.path.append('../data/')\n",
12-
"sys.path.append('../graphnics/')\n",
13-
"sys.path.append('../applications/')\n",
14-
"sys.path.append('../../NetworkGen/')\n",
1528
"import matplotlib.pyplot as plt\n",
1629
"import networkx as nx\n",
1730
"import numpy as np\n",

0 commit comments

Comments
 (0)