Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from fab4100/docker
Fixing examples Jupyter notebooks and adding Dockerfile
- Loading branch information
Showing
9 changed files
with
108 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.ipynb* | ||
.cache | ||
.config | ||
.ipython | ||
.jupyter | ||
.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM ubuntu:20.04 | ||
|
||
# update aptitude | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=Europe/Zurich | ||
RUN apt-get update && apt-get -y --fix-missing upgrade | ||
|
||
# install aptitude essentials | ||
RUN apt-get -y install \ | ||
build-essential \ | ||
meson \ | ||
cmake \ | ||
git \ | ||
vim \ | ||
curl \ | ||
openmpi-bin \ | ||
openmpi-common \ | ||
libhdf5-openmpi-dev \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-numpy \ | ||
python3-matplotlib \ | ||
python3-pandas \ | ||
python3-scipy \ | ||
python3-xlrd \ | ||
python3-ipython \ | ||
dirmngr apt-transport-https lsb-release ca-certificates | ||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - | ||
RUN apt-get -y install nodejs | ||
|
||
RUN python3 -m pip install --upgrade pip | ||
RUN python3 -m pip install jupyter jupyterlab ipympl | ||
RUN python3 -m pip install pylj | ||
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager | ||
RUN jupyter labextension install jupyter-matplotlib | ||
|
||
ENTRYPOINT ["jupyter", "lab"] | ||
CMD ["--ip=0.0.0.0", "--port=8888", "--no-browser"] | ||
|
||
# run the container with: | ||
# $ docker run -it --rm -p 8888:8888 <image name> | ||
|
||
# add non-root user | ||
RUN useradd -m pylj | ||
WORKDIR /home/pylj | ||
USER pylj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
docker build -f Dockerfile -t 'pythoninchemistry:latest' . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
CWD=$(pwd -P) | ||
docker run \ | ||
-u $(id -u):$(id -g) -v ${CWD}:${CWD} -w ${CWD} -e HOME=${CWD} \ | ||
-it --rm -p 8888:8888 pythoninchemistry:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters