Skip to content

Commit

Permalink
Merge branch 'main' into rokroskar-patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Nov 19, 2024
2 parents e737a8d + 04e007f commit dc2fdcb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
5 changes: 0 additions & 5 deletions docker/matlab-jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ SHELL [ "/bin/bash", "-c", "-o", "pipefail" ]
# prepend conda and local/bin to PATH
ENV PATH ${HOME}/.local/bin:${CONDA_PATH}/bin:${HOME}/.renku/bin:$PATH

# Add Tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini && ln -s /tini /usr/bin/

# install dependencies
RUN apt-get update --fix-missing && \
apt-get install -yq --no-install-recommends \
Expand Down
36 changes: 20 additions & 16 deletions docker/py/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

if [[ -v GIT_AUTHOR_NAME && -v EMAIL && -v CI_PROJECT ]];
then
if [[ -v GIT_AUTHOR_NAME && -v EMAIL && -v CI_PROJECT ]]; then
# Setup git user
if [ -z "$(git config --global --get user.name)" ]; then
git config --global user.name "$GIT_AUTHOR_NAME"
Expand All @@ -11,8 +10,7 @@ then
fi

# configure global git credentials
if [[ -v CI_PROJECT ]];
then
if [[ -v CI_PROJECT ]]; then
# set the global git credentials
git config --global credential.helper "store --file=/work/${CI_PROJECT}/.git/credentials"

Expand All @@ -22,7 +20,7 @@ then
fi

# install git hooks
renku githooks install > /dev/null 2>&1 || true
renku githooks install >/dev/null 2>&1 || true

# run the post-init script in the root directory (i.e. coming from the image)
if [ -f "/post-init.sh" ]; then
Expand All @@ -36,9 +34,9 @@ fi

# inject ssh public keys if any exist
if [ -f "./.ssh/authorized_keys" ]; then
echo >> ~/.ssh/authorized_keys
cat ./.ssh/authorized_keys >> ~/.ssh/authorized_keys
echo >> ~/.ssh/authorized_keys
echo >>~/.ssh/authorized_keys
cat ./.ssh/authorized_keys >>~/.ssh/authorized_keys
echo >>~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
fi

Expand All @@ -47,14 +45,20 @@ fi

# Override the jupyter command to be forward compatible with newer
# images that no longer launch the whole server with `jupyter notebook`.
jupyter() {
if [ "$1" = "notebook" ];
then
shift
$(which jupyter) server $@;
else $(which jupyter) $@;
fi;
jupyter() {
if [ "$1" = "notebook" ]; then
shift
$(which jupyter) server "$@"
else
$(which jupyter) "$@"
fi
}

if [[ -v RENKU_BASE_URL_PATH ]]; then
"$@" --ServerApp.port=8888 --ServerApp.base_url="$RENKU_BASE_URL_PATH" \
--ServerApp.token="" --ServerApp.password="" --ServerApp.allow_remote_access=true \
--ContentsManager.allow_hidden=true --ServerApp.allow_origin=*
fi

# run the command
$@
"$@"
1 change: 1 addition & 0 deletions docker/py/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- jupyter-server-proxy==4.3.0
- jupyterlab>4.0,<5.0
- jupyterlab-git==0.50.1
- jupyter_server==2.6.0
- mistune>=2.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
- papermill~=2.6.0
- requests>=2.20.0
Expand Down

0 comments on commit dc2fdcb

Please sign in to comment.