Skip to content

Commit 8fb5f1a

Browse files
committed
Remove sys.path hack from demo.ipynb and add source code to PYTHONPATH in dockerfile
1 parent 71d623a commit 8fb5f1a

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ USER root
1616
RUN chown -R ${NB_UID} ${HOME}
1717

1818
USER ${NB_USER}
19+
20+
ENV PYTHONPATH /repo/example-paper-fenics/code:${PYTHONPATH}
21+
1922
ENTRYPOINT []

docs/demo.ipynb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,6 @@
4040
"!ls mesh"
4141
]
4242
},
43-
{
44-
"cell_type": "markdown",
45-
"id": "f3327106",
46-
"metadata": {},
47-
"source": [
48-
"Now we need to make sure that we can import the fuctions from the `code` folder. We can do this by adding the `code` folder to `sys.path`. "
49-
]
50-
},
51-
{
52-
"cell_type": "code",
53-
"execution_count": null,
54-
"id": "2a251028",
55-
"metadata": {},
56-
"outputs": [],
57-
"source": [
58-
"import sys\n",
59-
"sys.path.insert(0, \"../code\")"
60-
]
61-
},
6243
{
6344
"cell_type": "markdown",
6445
"id": "4610db02",

0 commit comments

Comments
 (0)