-
Notifications
You must be signed in to change notification settings - Fork 5
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 #108 from DSD-DBS/jupyter
Jupyter image
- Loading branch information
Showing
7 changed files
with
133 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
ARG BASE_IMAGE=base | ||
FROM $BASE_IMAGE | ||
|
||
RUN apt update && \ | ||
apt install --yes --no-install-recommends \ | ||
git \ | ||
git-lfs \ | ||
libgirepository1.0-dev \ | ||
libcairo2-dev \ | ||
gir1.2-pango-1.0 \ | ||
graphviz && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY docker-entrypoint.sh / | ||
COPY requirements_template.txt /etc/skel | ||
|
||
RUN chmod +x /docker-entrypoint.sh && \ | ||
python3 -m pip install jupyterlab capellambse | ||
|
||
ENV JUPYTER_PORT=8888 | ||
ENV NOTEBOOKS_DIR=/workspace/notebooks | ||
|
||
EXPOSE $JUPYTER_PORT | ||
|
||
USER techuser | ||
WORKDIR $HOME | ||
|
||
ENTRYPOINT "/docker-entrypoint.sh" |
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,20 @@ | ||
#!/bin/sh | ||
|
||
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
echo "---START_PREPARE_WORKSPACE---" | ||
|
||
mkdir -p "$NOTEBOOKS_DIR" | ||
|
||
test -f "$NOTEBOOKS_DIR/requirements.txt" || cp /etc/skel/requirements_template.txt "$NOTEBOOKS_DIR/requirements.txt" | ||
pip install -r "$NOTEBOOKS_DIR/requirements.txt" 2>&1 | tee "$NOTEBOOKS_DIR/installlog.txt" | ||
|
||
echo "---START_SESSION---" | ||
|
||
jupyter-lab --ip=0.0.0.0 \ | ||
--port=$JUPYTER_PORT \ | ||
--no-browser \ | ||
--ServerApp.authenticate_prometheus=False \ | ||
--ServerApp.base_url="$JUPYTER_BASE_URL" \ | ||
--ServerApp.root_dir="$NOTEBOOKS_DIR" |
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 @@ | ||
# Use this file to define custom dependencis for your Jupyter workspace. | ||
# The format of the requirements file is described at | ||
# https://pip.pypa.io/en/stable/reference/requirements-file-format/ | ||
|
||
# numpy | ||
# pandas |
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,2 @@ | ||
SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors | ||
SPDX-License-Identifier: CC0-1.0 |