Skip to content

Commit b9d405e

Browse files
committed
iso
1 parent 00b0cce commit b9d405e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Notebook-iso.Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ RUN mamba clean --all -f -y && \
1919
fix-permissions "${CONDA_DIR}" && \
2020
fix-permissions "/home/${NB_USER}"
2121

22+
COPY start-nb-base.sh /usr/local/bin/
23+
RUN chmod 755 /usr/local/bin/start-nb-base.sh
24+
2225
COPY pip.conf /etc/pip.conf
2326

2427
COPY ubuntu.sources /etc/apt/sources.list.d
2528

2629
USER ${NB_UID}
2730

28-
RUN sed -i '/eval "$(conda shell.bash hook)"/c\export PATH="/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:$PATH"\neval "$(conda shell.bash hook)"' ~/.bashrc
31+
RUN sed -i '/eval "$(conda shell.bash hook)"/c\export PATH="/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:/opt/conda/condabin:/opt/conda/bin:$PATH"\neval "$(conda shell.bash hook)"' ~/.bashrc
32+
33+
ENTRYPOINT ["tini", "-g", "--"]
34+
CMD ["/usr/local/bin/start-nb-base.sh"]

start-nb-base.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# Copyright (c) Xiang Shi (KevinZonda) & KigLand
3+
4+
set -e
5+
6+
# Check if NB_VAR_BASE_URL is set
7+
if [ -z "$NB_VAR_BASE_URL" ]; then
8+
exec start-notebook.sh
9+
else
10+
exec start-notebook.sh --NotebookApp.base_url="$NB_VAR_BASE_URL"
11+
fi

0 commit comments

Comments
 (0)