-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Greg Werner <werner.greg@gmail.com>
- Loading branch information
Showing
7 changed files
with
128 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Based mostly off of: | ||
# https://github.com/jupyter/docker-stacks/blob/main/images/julia-notebook | ||
ARG REGISTRY=quay.io | ||
ARG OWNER=jupyter | ||
ARG BASE_CONTAINER=$REGISTRY/$OWNER/minimal-notebook | ||
FROM $BASE_CONTAINER | ||
|
||
ENV NB_UID=1000 | ||
ENV NB_GID=100 | ||
|
||
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 | ||
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
USER "${NB_USER}" | ||
|
||
# Install Jupyter Console and Kernel Gateway | ||
RUN pip install jupyter-console jupyter_kernel_gateway | ||
|
||
# Install deno | ||
RUN curl -fsSL https://deno.land/x/install/install.sh | sh \ | ||
&& "${HOME}/.deno/bin/deno" jupyter --unstable --install \ | ||
&& mv "${HOME}/.deno/bin/deno" "${CONDA_DIR}/bin" \ | ||
&& rm -Rf "${HOME}/.deno/bin/deno" | ||
|
||
RUN rm -Rf "${HOME}/.local/share/jupyter/kernels/deno" \ | ||
&& mkdir -p "${CONDA_DIR}/share/jupyter/kernels/deno" | ||
COPY --chown=${NB_UID}:${NB_GID} "setup-scripts/kernel-deno.json" "${CONDA_DIR}/share/jupyter/kernels/deno/kernel.json" | ||
|
||
# update permissions as root | ||
USER root | ||
RUN fix-permissions /etc/jupyter/ \ | ||
&& fix-permissions "${CONDA_DIR}" \ | ||
&& fix-permissions "${HOME}" | ||
|
||
USER "${NB_USER}" | ||
|
||
WORKDIR "${HOME}" | ||
|
||
CMD ["jupyter", "kernelgateway", "--KernelGatewayApp.ip=0.0.0.0", "--KernelGatewayApp.port=8888"] |
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,12 @@ | ||
{ | ||
"argv": [ | ||
"deno", | ||
"--unstable-ffi", | ||
"jupyter", | ||
"--kernel", | ||
"--conn", | ||
"{connection_file}" | ||
], | ||
"display_name": "Deno", | ||
"language": "typescript" | ||
} |
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,42 @@ | ||
# Based mostly off of: | ||
# https://github.com/jupyter/docker-stacks/blob/main/images/julia-notebook | ||
ARG REGISTRY=quay.io | ||
ARG OWNER=jupyter | ||
ARG BASE_CONTAINER=$REGISTRY/$OWNER/minimal-notebook | ||
FROM $BASE_CONTAINER | ||
|
||
ENV NB_UID=1000 | ||
ENV NB_GID=100 | ||
|
||
# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 | ||
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
USER "${NB_USER}" | ||
|
||
# Install Jupyter Console and Kernel Gateway | ||
RUN pip install jupyter-console jupyter_kernel_gateway | ||
|
||
# Install tslab | ||
ENV PATH "$PATH:${CONDA_DIR}/.npm-global/bin" | ||
RUN mkdir "${CONDA_DIR}/.npm-global" \ | ||
&& npm config set prefix "${CONDA_DIR}/.npm-global" \ | ||
&& npm install -g tslab \ | ||
&& tslab install \ | ||
&& rm -Rf "${HOME}/.npm-global/bin/tslab" | ||
|
||
RUN rm -Rf "${HOME}/.local/share/jupyter/kernels/tslab" \ | ||
&& mkdir -p "${CONDA_DIR}/share/jupyter/kernels/tslab" | ||
COPY --chown=${NB_UID}:${NB_GID} "setup-scripts/kernel-tslab.json" "${CONDA_DIR}/share/jupyter/kernels/tslab/kernel.json" | ||
|
||
# update permissions as root | ||
USER root | ||
RUN fix-permissions /etc/jupyter/ \ | ||
&& fix-permissions "${CONDA_DIR}" \ | ||
&& fix-permissions "${HOME}" | ||
|
||
USER "${NB_USER}" | ||
|
||
WORKDIR "${HOME}" | ||
|
||
CMD ["jupyter", "kernelgateway", "--KernelGatewayApp.ip=0.0.0.0", "--KernelGatewayApp.port=8888"] |
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 @@ | ||
{"argv": ["tslab", "kernel", "--config-path", "{connection_file}"], "display_name": "Node (TypeScript)", "language": "typescript"} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
duckduckgo-search | ||
psycopg2-binary | ||
gpt4all | ||
jupyter_kernel_gateway | ||
|