diff --git a/.gitmodules b/.gitmodules index b7efcb4..a852e75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,13 @@ [submodule "test/bats"] path = test/bats url = https://github.com/bats-core/bats-core.git + branch = master [submodule "test/test_helper/bats-support"] path = test/test_helper/bats-support url = https://github.com/bats-core/bats-support.git + branch = master [submodule "test/test_helper/bats-assert"] path = test/test_helper/bats-assert url = https://github.com/bats-core/bats-assert.git + branch = master + diff --git a/devcontainers/conda-jupyter-node/README.md b/devcontainers/conda-jupyter-node/README.md new file mode 100644 index 0000000..3409485 --- /dev/null +++ b/devcontainers/conda-jupyter-node/README.md @@ -0,0 +1,15 @@ +# Conda Juptyer Node +* +```bash +cd devcontainers/conda-jupyter-node +code devcontainers/conda-jupyter-node +``` +```bash +docker compose -f ./docker/docker-compose.yml up -d # detached +docker compose -f ./docker/docker-compose.yml up -d --build # + +docker compose -f ./docker/docker-compose.yml start +docker compose -f ./docker/docker-compose.yml attach webapp # will kill if exit + +docker compose -f ./docker/docker-compose.yml exec webapp /bin/zsh +``` \ No newline at end of file diff --git a/devcontainers/conda-jupyter-node/docker/Dockerfile b/devcontainers/conda-jupyter-node/docker/Dockerfile new file mode 100644 index 0000000..617b374 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/Dockerfile @@ -0,0 +1,39 @@ +FROM debian:bookworm-slim +# https://docs.docker.com/reference/dockerfile/ + +# known dependencies: curl +# dev dependencies: zsh tree tldr git wget +# omz: git ca-certificates procps (ps) +RUN apt-get update && apt-get install -y \ + curl \ + zsh tree wget git ca-certificates procps tar bzip2 \ + && rm -rf /var/lib/apt/lists/* +# rm -rf /var/lib/apt/lists/* is to clean up after apt-get +# maybe add tmux etc. only + +# assume mounted docker to /webapp using compose +SHELL ["/bin/bash", "-c"] + +# won't actually mount anything. it's for documentation +VOLUME ["/webapp"] +WORKDIR /webapp +# COPY . /webapp +# using compose to mount +# copy lib over for zsh? or nah +# default port for jupterlab +EXPOSE 8888 + +HEALTHCHECK --interval=5m --timeout=3s \ + CMD set -euxo pipefail; printenv SHELL | grep -i zsh ; \ + curl -f http://localhost:8888/ || exit 1 + +# entrypoint if mounting using compose has to be in compose +# ENTRYPOINT [ "./entrypoints/smoke-tests.sh" ] +# cmd is also overided by compose since entrypoint was declared there +SHELL ["/bin/zsh", "-c"] +ENV SHELL=/usr/bin/zsh +ENV LANG=en_CA.UTF-8 +ENV TERM=xterm-256color +COPY ./lib/*.sh ./lib/ +RUN set -x ; chsh -s $(which zsh) && ./lib/readme_zsh_plugin_copy.md.sh +CMD /bin/zsh diff --git a/devcontainers/conda-jupyter-node/docker/docker-compose.override.yml b/devcontainers/conda-jupyter-node/docker/docker-compose.override.yml new file mode 100644 index 0000000..e80751d --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/docker-compose.override.yml @@ -0,0 +1,11 @@ +# Docker Compose for mounting volumes during build +version: "3.8" +services: + webapp: + # entrypoint: ./entrypoints/smoke-tests.sh # defn worked + entrypoint: ./entrypoints/labs/conda-micromamba.sh + + + # ports is it annray... gest appendd + # ports: + # - "8888:8888" diff --git a/devcontainers/conda-jupyter-node/docker/docker-compose.yml b/devcontainers/conda-jupyter-node/docker/docker-compose.yml new file mode 100644 index 0000000..a5744c7 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/docker-compose.yml @@ -0,0 +1,26 @@ +# Docker Compose for mounting volumes during build +version: "3.8" +name: conda-jupyter-node +# i guess proper name would be conda-node-jupyter so +# compose would auto append +services: + webapp: + # comment out to skip build + # called docker-webapp for some reason + container_name: jupyter-webapp + hostname: jupyter-webapp + # for dev: maybe should add a dev env file + stdin_open: true # docker run -i. needed until a service is running + tty: true # docker run -t. instead of bash... cuz bash is not a service + + build: + context: . + dockerfile: ./Dockerfile + entrypoint: ./entrypoints/smoke-tests.sh # defn worked + command: /bin/zsh # since entrypoint is defined + # image: jchan48h/conda-jupyter-node + volumes: + - .:/webapp + + ports: + - "8888:8888" diff --git a/devcontainers/conda-jupyter-node/docker/entrypoints/labs/conda-micromamba.sh b/devcontainers/conda-jupyter-node/docker/entrypoints/labs/conda-micromamba.sh new file mode 100644 index 0000000..c231d17 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/entrypoints/labs/conda-micromamba.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +## note entry points run everytime the container starts +set -euxo pipefail +USER=${USERNAME:-root} +cat /etc/os-release | grep ID # ID=debian +printenv | grep -i home +getent passwd $USER | head -n 1 | cut -d: -f7 # check which is the default shell +getent passwd $USER | head -n 1 | cut -d: -f7 | grep -i zsh +printenv SHELL | grep -i zsh + + +exec "$@" diff --git a/devcontainers/conda-jupyter-node/docker/entrypoints/smoke-tests.sh b/devcontainers/conda-jupyter-node/docker/entrypoints/smoke-tests.sh new file mode 100644 index 0000000..a059609 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/entrypoints/smoke-tests.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +## note entry points run everytime the container starts +set -euxo pipefail +# LOGNAME=root +# USER=${USERNAME:LOGNAME:-root} +USER=${USERNAME:-root} +# USER=${LOGNAM:-root} +cat /etc/os-release | grep ID # ID=debian +printenv | grep -i home +getent passwd $USER | head -n 1 | cut -d: -f7 # check which is the default shell +getent passwd $USER | head -n 1 | cut -d: -f7 | grep -i zsh +printenv SHELL | grep -i zsh +# doesn't need to be bash even +# using healthcheck as well +# lib/readme_zsh_plugin_copy.md.sh + +exec "$@" diff --git a/devcontainers/conda-jupyter-node/docker/lib/readme_micromamba_conda_install.md.zsh b/devcontainers/conda-jupyter-node/docker/lib/readme_micromamba_conda_install.md.zsh new file mode 100644 index 0000000..1fc1d86 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/lib/readme_micromamba_conda_install.md.zsh @@ -0,0 +1,77 @@ +#!/usr/bin/env zsh +set -euxo pipefail + +# copied +# Checks if packages are installed and installs them if not +check_packages() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi + apt-get -y install --no-install-recommends "$@" + fi +} + +cd $HOME +# mkdir -p $HOME/bin +# curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest +# https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html#linux-and-macos +# apt update # needed bzip2 +# apt install -y bzip2 +curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba +# curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj -C bin/micromamba +eval "$(./bin/micromamba shell hook -s posix)" +# assuming zsh... should maybe should change that +./bin/micromamba shell init -s zsh -p ~/micromamba +source ~/.zshrc +alias conda=micromamba + +# set default +micromamba config append channels conda-forge +micromamba config set channel_priority strict + +# this might not work... because it might create a new shell +# right... that's why i think the instructions told us to use the bin +micromamba activate # this activates the base environment +micromamba create -y --name 311 python=3.11 pipx poetry +micromamba activate 311 +micromamba create -y --name 312 python=3.12 pipx poetry +micromamba activate 312 + +pipx install pipx +pipx ensurepath +pipx completion + +conda install -y jupyterlab nodejs + +# conda env export --no-prefix > environment.yml +# conda env export > environment.yml +# conda env export +conda env export --from-history +# node --version +# this is going to take a bit of time to try... + +# should check if it set +exit 0 +/webapp/tests/smoke-test-0.sh +./lib/readme_micromamba_conda_install.md.zsh +###### jupyter lab --no-browser +jupyter lab +jupyter lab --no-browser +jupyter lab --no-browser --allow-root + + +# figure out later +# jupyter lab --no-browser --allow-root --no-token +jupyter lab --help-all |grep -i token +jupyter lab --help-all |grep -i no +jupyter lab --help-all |grep -i pass +jupyter lab --help-all |grep -i auth + +### conda aliased +conda env list +# use port forward +# localhost:8888 +# by attaching if forgot +# file:///root/.local/share/jupyter/runtime/jpserver-4201-open.html \ No newline at end of file diff --git a/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md b/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md new file mode 100644 index 0000000..b2326b9 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md @@ -0,0 +1,103 @@ +# Useful stuff +* should have the command to download these two files +* and run +* `check_packages` + * it's legit + * it checks the lists before doing apt update + * but it should probably clean up after itself being inside of a docker + +## zsh plugins +* https://github.com/zsh-users?q=&type=all&language=&sort= + * omz plugins are here +* plugins are the official ones? + * https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins + +# Check Shell +```bash +cat /etc/shells +printenv SHELL +echo $SHELL +getent passwd $USER | cut -d: -f7 +getent passwd $USER | cut -d: -f7 | head -n 1 # probably most accurate one +getent passwd $USER |grep -i zsh #aaaa +getent passwd $USER | head -n 1 | cut -d: -f7 # this ? unless it's different shoudl try +# after set +SHELL=/usr/bin/zsh +chsh -s $(which zsh) +chsh -s /usr/bin/zsh +# set -x is to print each command. set +x +set +x +echo chsh -s $(which zsh) +set -x ; chsh -s $(which zsh) +ps -p $$ # +# interesting +# install ps +apt install procps +sudo apt-get update && apt-get install -y procps + +# optional installs +# or i should have slim and non slim? +# feels more liek a packer thing here +``` + +# todo +* [ ] add sudo +* [ ] rsync? + +# Schema here +```jsonc +{ + "name": "ZSH Plugins", + "id": "zsh-plugins", + "version": "0.0.4", + "description": "Install (Oh-My-)ZSH plugins", + "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/zsh-plugins", + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/git" + ], + "options": { + "plugins": { + "type": "string", + "default": "", + "proposals": [ + "ssh-agent npm" + ], + "description": "Space separated list of ZSH plugin names that will be added to .zshrc" + }, + "omzPlugins": { + "type": "string", + "default": "", + "proposals": [ + "https://github.com/zsh-users/zsh-autosuggestions" + ], + "description": "Space separated list of Oh-My-ZSH custom plugin Git URLs that will be cloned" + }, + "username": { + "type": "string", + "default": "", + "proposals": [ + "root", + "node", + "vscode" + ], + "description": "For which user to setup ZSH plugins, by default uses 'remoteUser' or 'containerUser' from config" + } + } +} +``` +```bash +#!/usr/bin/env bash +# my install and experiment +# check envs +printenv USERNAME +printenv $_REMOTE_USER +printenv _REMOTE_USER +printenv USER +echo $USER + +export USERNAME=${USERNAME:-root} +printenv USERNAME +unset USERNAME + +``` \ No newline at end of file diff --git a/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md.sh b/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md.sh new file mode 100644 index 0000000..41e2abf --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/lib/readme_zsh_plugin_copy.md.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env bash +# https://github.com/devcontainers-contrib/features/blob/main/src/zsh-plugins/install.sh +# https://github.com/devcontainers-contrib/features/tree/main/src/zsh-plugins +# using their plugin's sh... interesting +# isn't it user? +# or use $HOME? lol +# LOGNAME=root +# hardcodign root for now as default +# author is using it for finding home directory.. w/e +export USERNAME=${USERNAME:-root} +# space seperated ones to add to ~/.zshrc +# export PLUGINS="ssh-agent npm" +## the plugins didnt get added... as expected... +# https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins +# git is defaulted +export PLUGINS="ssh-agent npm zsh-autosuggestions zsh-syntax-highlighting zsh-completions python docker docker-compose gh yarn node" +# export PLUGINS="${PLUGINS} rsync dotenv" +# if ID is debian append debian to plugins +if [ -f /etc/os-release ]; then + if cat /etc/os-release | grep ID | grep debian; then + export PLUGINS="${PLUGINS} debian" + elif cat /etc/os-release | grep ID | grep ubuntu; then + export PLUGINS="${PLUGINS} ubuntu" + fi +fi +# export PLUGINS="${PLUGINS} rsync " + +# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/composer +# might be useful +# need to add rsync +# ones to git clone into ~/.oh-my-zsh/custom/plugins +# https://github.com/zsh-users?q=&type=all&language=&sort= +# should write a quick parser for this +export OMZPLUGINS="https://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-syntax-highlighting https://github.com/zsh-users/zsh-completions" +# wonder if they they need to be repeated? +# get current script directory +current_script_path="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")" +script_directory="$(dirname "$current_script_path")" +# test if ~/.ssh exists and if not create it +if [ ! -d ~/.ssh ]; then + # for the ssh-agent plugin + mkdir -p ~/.ssh + chmod 700 ~/.ssh +fi +# should check zsh / chsh before continue +chsh -s /usr/bin/zsh +# Run +$script_directory/zsh-plugins-install.copy.sh + +# source again +# https://codeforwings.github.io/vite-press-docs/posix/docs_readme_bash.html#zshrc +echo 'PROMPT="$USERNAME@`hostname`%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ ) %{$fg[cyan]%}%c%{$reset_color%} "' >> ~/.zshrc + +if [ $(tput colors -T xterm-256color) == "256" ]; then + # maybe i should check before doing so. and add my own little snippet + # tput colors -T xterm-256color + echo 'export TERM=xterm-256color' >> ~/.zshrc +fi +source ~/.zshrc +exit 0 +##### +lib/readme_zsh_plugin_copy.md.sh + +# debug plugins +cat ~/.zshrc | grep plugins + +# interesting i can install xterm +# but i think that's a gui app +# debug term +echo $TERM +# tree looks funny +pstree -s $$ +ps -o comm= -p $(ps -o ppid= -p $$) + +# encoding +# empty... +echo $LC_CTYPE +echo $LANG +printenv LC_CTYPE +printenv LANG +echo -e '\xe2\x82\xac' +echo -e '\xe2\x82\xac' | grep '€' # doesnt work lol +echo -e '\xe2\x82\xac' | grep -P '\xe2\x82\xac' +iconv -f utf-8 -t utf-8 <<< '\xe2\x82\xac' # € +luit -encoding utf-8 echo -e '\xe2\x82\xac' # € + +### +pwd +./lib/readme_zsh_plugin_copy.md.sh +bash ./lib/readme_zsh_plugin_copy.md.sh +tree -A ./lib +chmod +x ./lib/readme_zsh_plugin_copy.md.sh +git update-index --chmod=+x ./lib/readme_zsh_plugin_copy.md.sh +# Schema here +: +{ + "name": "ZSH Plugins", + "id": "zsh-plugins", + "version": "0.0.4", + "description": "Install (Oh-My-)ZSH plugins", + "documentationURL": "http://github.com/devcontainers-contrib/features/tree/main/src/zsh-plugins", + "installsAfter": [ + "ghcr.io/devcontainers/features/common-utils", + "ghcr.io/devcontainers/features/git" + ], + "options": { + "plugins": { + "type": "string", + "default": "", + "proposals": [ + "ssh-agent npm" + ], + "description": "Space separated list of ZSH plugin names that will be added to .zshrc" + }, + "omzPlugins": { + "type": "string", + "default": "", + "proposals": [ + "https://github.com/zsh-users/zsh-autosuggestions" + ], + "description": "Space separated list of Oh-My-ZSH custom plugin Git URLs that will be cloned" + }, + "username": { + "type": "string", + "default": "", + "proposals": [ + "root", + "node", + "vscode" + ], + "description": "For which user to setup ZSH plugins, by default uses 'remoteUser' or 'containerUser' from config" + } + } +} +# end diff --git a/devcontainers/conda-jupyter-node/docker/lib/zsh-plugins-install.copy.sh b/devcontainers/conda-jupyter-node/docker/lib/zsh-plugins-install.copy.sh new file mode 100644 index 0000000..e73cab0 --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/lib/zsh-plugins-install.copy.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +## raw file from this +# https://raw.githubusercontent.com/devcontainers-contrib/features/main/src/zsh-plugins/install.sh +## main source +# https://github.com/devcontainers-contrib/features/blob/main/src/zsh-plugins/install.sh +## tests source +# https://github.com/devcontainers-contrib/features/tree/main/test/zsh-plugins +set -x +PLUGINS=${PLUGINS:-""} +OMZSH_PLUGINS=${OMZPLUGINS:-""} +USERNAME=${USERNAME:-$_REMOTE_USER} + + +# Checks if packages are installed and installs them if not +check_packages() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi + apt-get -y install --no-install-recommends "$@" + fi +} + + +check_packages git ca-certificates + +# ensure zsh is installed +if ! type zsh >/dev/null 2>&1; then + check_packages zsh +fi + +if [ "$USERNAME" = "root" ]; then + USER_LOCATION="/root" +else + USER_LOCATION="/home/$USERNAME" +fi + +# ensure oh-my-zsh installed +if ! [ -d $USER_LOCATION/.oh-my-zsh ]; then + check_packages wget + sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" +fi + +ZSH_CONFIG="$USER_LOCATION/.zshrc" +OMZSH_PLUGINS_LOCATION="$USER_LOCATION/.oh-my-zsh/custom/plugins" + +# Install custom oh-my-zsh plugins from OMZSH_PLUGINS +currdir=$(pwd) +mkdir -p "$OMZSH_PLUGINS_LOCATION" +cd "$OMZSH_PLUGINS_LOCATION" || exit + +IFS=' ' read -ra plugins <<< "${OMZSH_PLUGINS}" + +for plugin in "${plugins[@]}" +do + git clone --depth 1 $plugin +done + +cd "$currdir" || exit + +# create configuration file if not exists +if ! [ -f "$ZSH_CONFIG" ]; then + mkdir -p "$(dirname "$ZSH_CONFIG")" && touch "$ZSH_CONFIG" +fi + +# Activate zsh plugins from PLUGINS +sed -i -e "s/plugins=.*/plugins=(git ${PLUGINS})/g" "$ZSH_CONFIG" diff --git a/devcontainers/conda-jupyter-node/docker/tests/smoke-test-0.sh b/devcontainers/conda-jupyter-node/docker/tests/smoke-test-0.sh new file mode 100644 index 0000000..d28233d --- /dev/null +++ b/devcontainers/conda-jupyter-node/docker/tests/smoke-test-0.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# set -euxo pipefail +# set -x + +# Checks if packages are installed and installs them if not +check_packages() { + if ! dpkg -s "$@" >/dev/null 2>&1; then + if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then + echo "Running apt-get update..." + apt-get update -y + fi + apt-get -y install --no-install-recommends "$@" + fi +} + +# Check Packages +log_packages() { + echo "Checking for packages: $@" + for package in "$@"; do + # if not in whence which command type? + if which "$package" > /dev/null 2>&1 ; then + # echo green text to stdout + echo -e "Package \e[32m$package\e[0m is in path" "\xE2\x9C\x94""\xE2\x9C\x94" + elif ! dpkg -s "$package" >/dev/null 2>&1; then + # echo red text to stdout + echo -e "Package \e[31m$package\e[0m is not installed" + # echo -e "Package \e[31m$package\e[0m is not installed" >&2 + # echo "Package $package is not installed" + else + echo -e "Package \e[32m$package\e[0m is installed" "\xE2\x9C\x94" + fi + done +} +log_packages tar curl bzip2 micromamba python pip pipx jupyter node +exit 0 +######### +./tests/smoke-test-0.sh +# debug works well: +log_packages git ca-certificates zsh wget + diff --git a/devcontainers/conda-jupyter-node/docs_readme_conda_jupyter_node.md b/devcontainers/conda-jupyter-node/docs_readme_conda_jupyter_node.md new file mode 100644 index 0000000..0d3382b --- /dev/null +++ b/devcontainers/conda-jupyter-node/docs_readme_conda_jupyter_node.md @@ -0,0 +1,116 @@ +# Conda jupyter Node +## Goal +* Use notebook like +* https://streamlit.io/ +* jupyterLab Notebook +* docker seems much faster than packer and devcontainer when creating the initial image + + + +## Tasks +* docker debian bookworm minimal +* Install conda (micromamba) +* Install JupyterLab Notebook + * Check iKernels + * Check Configurations +* [ ] Add nice to haves +## Validation Criteria +* [x] conda is installed +* [x] python is installed + * (micromamba doesnt install python right away) +* [x] jupyterlab is installed +* [ ] jupyterlab is running +* [ ] jupyterlab is accessible from the host +* [x] jupyterlab is accessible from the browser +* [ ] jupyterlab is accessible w/o token + +### Nice to haves +* [ ] Save conda environment.env +* [ ] Save jupyterlab configurations +* [ ] Nice Tutorial + + +# Dev note +* Using docker to streamline the speed +* and/or packer + +## Docker +* Entry Point to smoke test + +```bash +# Docker +# assuming pwd is conda-jupyter-node/ +# docker build -t jchan48h/conda-jupyter-node ./docker +docker image prune -f +docker container prune -f +exit +docker compose -f ./docker/docker-compose.yml rm --force --volumes +docker compose -f ./docker/docker-compose.yml down --remove-orphans --volumes +docker compose -f ./docker/docker-compose.yml down +docker compose -f ./docker/docker-compose.yml up --build +docker compose -f ./docker/docker-compose.yml up --build -d +docker compose -f ./docker/docker-compose.yml up -d # detached +docker compose -f ./docker/docker-compose.yml up # to see the logs +docker compose -f ./docker/docker-compose.yml start +docker compose -f ./docker/docker-compose.yml attach webapp # will kill if exit +docker compose -f ./docker/docker-compose.yml exec webapp /bin/zsh +# docker compose -f ./docker/docker-compose.yml +# docker run attaches to the terminal +# docker run -it --rm --name conda-jupyter-node --hostname cfn conda-jupyter-node /bin/zsh +# smoke tests +pwd |grep webapp +tree `pwd` +exit + +# health check - in another terminal +docker container ls | grep conda-jupyter-node |grep health +docker image ls +```fac + + +# docker run --entrypoint /new/entrypoint your_image +``` + +# Backlog +* https://codeforwings.github.io/vite-press-docs/posix/docs_readme_bash.html#install-oh-my-zsh + +* [x] node / npm +* [x] zsh +* [x] tree +* [x] oh-my-zsh + * https://github.com/devcontainers-contrib/features/tree/main/src/zsh-plugins +* tmux + +# Not Planned +* ssh +* git config +* packer +* voila +* network etc. +* [ ] Add vscode snippets +* [ ] vscode extention +* jetbrains... +* migrate / check the codespace sample +* squid / apt-cacher-ng + * just ignore for now.. docker is fast enough + + + +# JuptyerLab +```bash +jupyter notebook --generate-config +jupyter notebook password +jupyter lab list +jupyter lab --help +jupyter lab --ip=0.0.0.0 +jupyter lab --no-browser +jupyter lab --notebook-dir=/path/to/notebook/directory +# right... need to default th theme etc +``` + +# Other kernels +* https://docs.jupyter.org/en/latest/projects/kernels.html +* https://github.com/jupyter/jupyter/wiki/Jupyter-kernels + +* https://github.com/n-riesco/ijavascript + * ijavascript \ No newline at end of file diff --git a/test/bats b/test/bats index 18eca24..ab2a86e 160000 --- a/test/bats +++ b/test/bats @@ -1 +1 @@ -Subproject commit 18eca2496cbd80ac97c73a70002e7ab4fb2179cf +Subproject commit ab2a86edc669c3344ea023a5c055ce96a5d05634