Initial Commit

master
Don Aldrich 3 years ago
commit 38be7b6c40
  1. 3
      .gitignore
  2. 35
      Dockerfile
  3. 24
      Taskfile.yml
  4. 38
      requirements.txt
  5. 24
      scripts/pre/startup.sh
  6. 91
      scripts/start/startup.sh

3
.gitignore vendored

@ -0,0 +1,3 @@
home/
install-tl/

@ -0,0 +1,35 @@
FROM jupyter/scipy-notebook
USER root
RUN apt-get update -y && apt-get install -y texlive-fonts-extra \
# && apt-get autoremove -y && apt-get autoclean -y \
# && rm -rf \
# /tmp/* \
# /var/cache/apt/archives/* \
# /var/lib/apt/lists/* \
# /var/tmp/*
RUN tlmgr update --self && tlmgr install fontawesome5
# && tlmgr install scheme-full
USER jovyan
COPY home/requirements.txt /home/jovyan
RUN pip install --quiet --no-cache-dir -r /home/jovyan/requirements.txt
RUN jlpm add --dev \
bash-language-server \
dockerfile-language-server-nodejs \
pyright \
sql-language-server \
typescript-language-server \
unified-language-server \
vscode-css-languageserver-bin \
vscode-html-languageserver-bin \
vscode-json-languageserver-bin \
yaml-language-server
RUN conda install --quiet --yes -c conda-forge texlab chktex && \
conda clean --all -f -y

@ -0,0 +1,24 @@
version: "3"
env:
tasks:
default:
cmds:
- task: build
- task: lint:caddy
- task: deploy:up
- task: image:push
build:
cmds:
- docker build --pull --load -f Dockerfile --tag donaldrich/jupyterhub:latest .
lint:scripts:
cmds:
- shellcheck scripts/**/*.sh --format=diff > data/shellcheck.diff
- patch -p1 < data/shellcheck.diff
test:prebuild:
cmds:
# - docker run donaldrich/caddy:latest cat modules.txt
- docker run -v "$PWD/config:/config" donaldrich/jupyterhub:latest

@ -0,0 +1,38 @@
httpie
parsel
# flatten_json
lxml
openpyxl
ipywidgets
gql
# nb_black
# bs2json
# papermill
# ploomber
nbdev
black
isort
# selenium
# scrapy_headless
# scrapy_selenium
# scrapy
# scrapy_splash
jupyterlab-git
jupyterlab_widgets
jupyterlab_latex
jupyter_console
jupyterlab_widgets
jupyterthemes
jedi-language-server
jupyterlab-lsp
# https://github.com/jupyterlab/jupyterlab-plugin-playground
jupyterlab-plugin-playground
jupyter_nbextensions_configurator
# jupyterlab-fonts
#
# jupyterlab_proxy_gui

@ -0,0 +1,24 @@
# apt install -qqq textlive
# pip install --upgrade -r /home/jovyan/code/requirements.txt
# tlmgr update --self && tlmgr install scheme-full
# install a package into the default (python 3.x) environment and cleanup after the installation
# mamba install --quiet --yes some-package && \
# mamba clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# pip install --quiet --no-cache-dir some-package && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# conda install --quiet --yes some-package && \
# conda clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# apt install -y libxss1 libappindicator1 libindicator7
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# dpkg -i google-chrome*.deb
# apt install -y -f

@ -0,0 +1,91 @@
#!/bin/sh
chown -R 1000:1000 /home/jovyan
# pip install --no-cache-dir --upgrade -r /home/jovyan/projects/secrets/jupyter/requirements.txt
# jupyter labextension install jupyterlab_onedarkpro
# jupyterlab-jupytext v1.3.6 enabled OK (python, jupytext)
# jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
# @jupyter-widgets/jupyterlab-manager v3.1.0 enabled OK (python, jupyterlab_widgets)
# jupyter-matplotlib v0.11.1 enabled OK
# @arbennett/base16-gruvbox-dark v0.1.5 enabled OK
# @jupyterlab/git v0.37.1 enabled OK
# @jupyterlab/latex v3.0.0 enabled OK
# @jupyterlab/plugin-playground v0.4.0 enabled OK
# @jupyterlab/plugin-playground needs to be included in build
# @jupyterlab/latex needs to be included in build
# @arbennett/base16-gruvbox-dark needs to be included in build
# pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install
sudo apt update -y && sudo apt install -y texlive-fonts-extra
tlmgr update --self && tlmgr install fontawesome5
# && tlmgr install scheme-full
pip install --quiet --no-cache-dir -r /home/jovyan/requirements.txt
jlpm add --dev \
bash-language-server \
dockerfile-language-server-nodejs \
pyright \
sql-language-server \
typescript-language-server \
unified-language-server \
vscode-css-languageserver-bin \
vscode-html-languageserver-bin \
vscode-json-languageserver-bin \
yaml-language-server
conda install --quiet --yes -c conda-forge texlab chktex && \
conda clean --all -f -y
# conda clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
nbdime extensions --enable
# RUN conda install --quiet --yes --freeze-installed -c conda-forge \
# 'python-language-server' \
# 'jupyterlab=3.1.0' \
# 'r-languageserver' \
# 'texlab' \
# 'chktex' \
# 'jupyter-lsp=1.5.1' \
# && jupyter labextension install --no-build \
# '@krassowski/jupyterlab-lsp@3.10.1' \
# && jupyter lab build --dev-build=False --minimize=True \
# && conda clean --all -f -y \
# && rm -rf \
# $CONDA_DIR/share/jupyter/lab/staging \
# /home/$NB_USER/.cache/yarn \
# && fix-permissions $CONDA_DIR \
# && fix-permissions /home/$NB_USER
jupyter lab build
# tlmgr update --self && tlmgr install scheme-full
# install a package into the default (python 3.x) environment and cleanup after the installation
# mamba install --quiet --yes some-package && \
# mamba clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# pip install --quiet --no-cache-dir some-package && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# conda install --quiet --yes some-package && \
# conda clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# apt install -y libxss1 libappindicator1 libindicator7
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
# dpkg -i google-chrome*.deb
# apt install -y -f
Loading…
Cancel
Save