Compare commits
No commits in common. "2161ca98051479c5068d7df565ce602bad22fb31" and "f06f00188cf05d1f10514ad0cc68538378f4578d" have entirely different histories.
2161ca9805
...
f06f00188c
|
@ -1,2 +0,0 @@
|
||||||
jupyter/jupyter
|
|
||||||
jupyter/notebooks
|
|
|
@ -31,6 +31,9 @@ To build this image, run `build/build.fish.` Edit the script to customize the im
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
- Port config
|
||||||
|
- User config
|
||||||
|
- Volume permissions
|
||||||
- Auto dark theme
|
- Auto dark theme
|
||||||
- Fix sage
|
- Fix sage
|
||||||
- Selenium (broken)
|
- Selenium (broken)
|
||||||
|
|
|
@ -156,6 +156,7 @@ RUN set -x && \
|
||||||
cut -d " " -f 1,2 \
|
cut -d " " -f 1,2 \
|
||||||
>> "${CONDA_DIR}/conda-meta/pinned" \
|
>> "${CONDA_DIR}/conda-meta/pinned" \
|
||||||
&& \
|
&& \
|
||||||
|
jupyter notebook --generate-config && \
|
||||||
mamba clean --all -f -y && \
|
mamba clean --all -f -y && \
|
||||||
npm cache clean --force && \
|
npm cache clean --force && \
|
||||||
jupyter lab clean && \
|
jupyter lab clean && \
|
||||||
|
@ -176,16 +177,13 @@ COPY jupyter_server_config.py /etc/jupyter/
|
||||||
COPY --chown=${NB_UID}:${NB_GID} Rprofile.site /opt/conda/lib/R/etc/
|
COPY --chown=${NB_UID}:${NB_GID} Rprofile.site /opt/conda/lib/R/etc/
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
#COPY overrides.json /opt/conda/share/jupyter/lab/settings/
|
||||||
|
|
||||||
RUN mkdir "${HOME}/notebooks" && \
|
RUN mkdir "${HOME}/notebooks" && \
|
||||||
chown "${NB_UID}:${NB_GID}" "${HOME}/notebooks" &&\
|
chown "${NB_UID}:${NB_GID}" "${HOME}/notebooks" &&\
|
||||||
chmod u+rwx "${HOME}/notebooks"
|
chmod u+rwx "${HOME}/notebooks"
|
||||||
VOLUME "${HOME}/notebooks"
|
VOLUME "${HOME}/notebooks"
|
||||||
|
|
||||||
RUN mkdir -p "${HOME}/.jupyter" && \
|
|
||||||
chown "${NB_UID}:${NB_GID}" "${HOME}/.jupyter" &&\
|
|
||||||
chmod u+rwx "${HOME}/.jupyter"
|
|
||||||
VOLUME "${HOME}/.jupyter"
|
|
||||||
|
|
||||||
# Legacy for Jupyter Notebook Server, see: [#1205](https://github.com/jupyter/docker-stacks/issues/1205)
|
# Legacy for Jupyter Notebook Server, see: [#1205](https://github.com/jupyter/docker-stacks/issues/1205)
|
||||||
#RUN sed -re "s/c.ServerApp/c.NotebookApp/g" \
|
#RUN sed -re "s/c.ServerApp/c.NotebookApp/g" \
|
||||||
|
|
|
@ -8,7 +8,7 @@ c = get_config() # noqa: F821
|
||||||
c.ServerApp.ip = "0.0.0.0"
|
c.ServerApp.ip = "0.0.0.0"
|
||||||
c.ServerApp.port = 8888
|
c.ServerApp.port = 8888
|
||||||
c.ServerApp.open_browser = False
|
c.ServerApp.open_browser = False
|
||||||
c.ServerApp.root_dir = "/home/jovyan/notebooks"
|
c.ServerApp.root_dir = "/home/joyvan/notebooks"
|
||||||
|
|
||||||
# to output both image/svg+xml and application/pdf plot formats in the notebook file
|
# to output both image/svg+xml and application/pdf plot formats in the notebook file
|
||||||
c.InlineBackend.figure_formats = {"png", "jpeg", "svg", "pdf"}
|
c.InlineBackend.figure_formats = {"png", "jpeg", "svg", "pdf"}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"@jupyterlab/apputils-extension:themes": {
|
||||||
|
"theme": "JupyterLab Dark"
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# The Jupyter command to launch
|
||||||
|
# JupyterLab by default
|
||||||
|
DOCKER_STACKS_JUPYTER_CMD="${DOCKER_STACKS_JUPYTER_CMD:=lab}"
|
||||||
|
|
||||||
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
|
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
|
||||||
echo "WARNING: using start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
|
echo "WARNING: using start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
|
||||||
exec /usr/local/bin/start-singleuser.sh "$@"
|
exec /usr/local/bin/start-singleuser.sh "$@"
|
||||||
|
@ -14,8 +18,4 @@ if [[ "${RESTARTABLE}" == "yes" ]]; then
|
||||||
wrapper=""
|
wrapper=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f /home/${NB_USER}/.jupyter/jupyter_notebook_config.py ]; then
|
exec /usr/local/bin/start.sh ${wrapper} jupyter ${DOCKER_STACKS_JUPYTER_CMD} ${NOTEBOOK_ARGS} "$@"
|
||||||
jupyter notebook --generate-config
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec /usr/local/bin/start.sh ${wrapper} jupyter lab ${NOTEBOOK_ARGS} "$@"
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ function build_image
|
||||||
-t betalupi/jupyter-inter-(math $img_idx + 1)
|
-t betalupi/jupyter-inter-(math $img_idx + 1)
|
||||||
|
|
||||||
|
|
||||||
date "+Finished at %Y-%m-%d %T"
|
|
||||||
if $remove_previous
|
if $remove_previous
|
||||||
printf "Done, cleaning up.\n\n"
|
printf "Done, cleaning up.\n\n"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -38,8 +37,7 @@ function build_image
|
||||||
set img_idx (math $img_idx + 1)
|
set img_idx (math $img_idx + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
date "+Build started at %Y-%m-%d %T"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# Base image MUST be built first
|
# Base image MUST be built first
|
||||||
printf "Building base image...\n"
|
printf "Building base image...\n"
|
||||||
|
@ -50,17 +48,15 @@ docker build \
|
||||||
printf "Done. \n\n"
|
printf "Done. \n\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build_image false octave
|
build_image false octave
|
||||||
build_image false r
|
build_image false r
|
||||||
#build_image false sage (BROKEN)
|
build_image false sage
|
||||||
#build_image false selenium (BROKEN)
|
|
||||||
|
|
||||||
build_image false plugins
|
build_image false plugins
|
||||||
build_image false pymodules
|
build_image pymodules
|
||||||
|
|
||||||
# Rename final image
|
# Rename final image
|
||||||
docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter
|
docker image tag betalupi/jupyter-inter-(math $img_idx) betalupi/jupyter
|
||||||
docker image rm betalupi/jupyter-inter-(math $img_idx)
|
docker image rm betalupi/jupyter-inter-(math $img_idx)
|
||||||
|
|
||||||
echo ""
|
|
||||||
date "+Build finished at %Y-%m-%d %T"
|
|
|
@ -1,27 +0,0 @@
|
||||||
ARG BASE_CONTAINER=betalupi/jupyter-base
|
|
||||||
FROM $BASE_CONTAINER
|
|
||||||
LABEL maintainer="Mark <mark@betalupi.com>"
|
|
||||||
|
|
||||||
USER ${NB_UID}
|
|
||||||
|
|
||||||
RUN mamba install --yes \
|
|
||||||
"selenium" \
|
|
||||||
&& \
|
|
||||||
# Cleanup
|
|
||||||
mamba clean --all -f -y && \
|
|
||||||
npm cache clean --force && \
|
|
||||||
jupyter lab clean && \
|
|
||||||
rm -rf "/home/${NB_USER}/.cache/yarn" && \
|
|
||||||
fix-permissions "${CONDA_DIR}" && \
|
|
||||||
fix-permissions "/home/${NB_USER}"
|
|
||||||
|
|
||||||
# Install google chrome
|
|
||||||
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
|
||||||
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/pt/#sources.list.d/google-chrome.list'
|
|
||||||
RUN apt-get -y update
|
|
||||||
RUN apt-get install -y google-chrome-stable
|
|
||||||
|
|
||||||
# Install chromedriver
|
|
||||||
RUN apt-get install -yqq unzip
|
|
||||||
RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
|
|
||||||
RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/
|
|
|
@ -7,8 +7,7 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- "./notebooks:/home/jovyan/notebooks"
|
- "./notebooks:/home/joyvan/notebooks"
|
||||||
- "./jupyter:/home/jovyan/.jupyter"
|
|
||||||
|
|
||||||
# host:container
|
# host:container
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in New Issue