add jupyter
Some checks failed
Build images / build-images-arm64 (push) Failing after 0s
Build images / build-images-amd64 (push) Failing after 48s
Build images / update-images-manifests (push) Has been skipped

This commit is contained in:
Maciej Lebiest 2024-03-17 15:58:07 +01:00
parent 20da2bb07a
commit 1b67ac5951
3 changed files with 71 additions and 3 deletions

View file

@ -6,6 +6,8 @@ on:
schedule: schedule:
- cron: '30 5 */10 * *' - cron: '30 5 */10 * *'
env:
IMAGES: system-toolbox cloud-toolbox tor zabbix-agent snowflake jupyter
jobs: jobs:
build-images-arm64: build-images-arm64:
runs-on: [ arm64 ] runs-on: [ arm64 ]
@ -19,7 +21,6 @@ jobs:
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Build selected images - name: Build selected images
run: | run: |
IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake);
for image in "${IMAGES[@]}"; for image in "${IMAGES[@]}";
do do
echo "building image $image"; echo "building image $image";
@ -39,7 +40,6 @@ jobs:
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Build selected images - name: Build selected images
run: | run: |
IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake);
for image in "${IMAGES[@]}"; for image in "${IMAGES[@]}";
do do
echo "building image $image"; echo "building image $image";
@ -57,7 +57,6 @@ jobs:
run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud
- name: Create manifests and push - name: Create manifests and push
run: | run: |
IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake);
for image in "${IMAGES[@]}"; for image in "${IMAGES[@]}";
do do
echo "Updating manifest for $image"; echo "Updating manifest for $image";

View file

@ -1,6 +1,26 @@
# Containers-Workspace # Containers-Workspace
Various useful and useless Dockerfiles, often experimental and work in progress Various useful and useless Dockerfiles, often experimental and work in progress
## jupyter
This is a custom image with jupyterlab and notebook installed.
Jupyter is running under root, for better possibilities of integration with
hardware (gpu, etc..) and for easier additional resources management
(dnf5 install, etc...)
There is also lsp environment prepared, with various lsp servers.
```bash
podman run --rm -it \
-e JUPYTER_TOKEN=my-secret-token \
-v /some/path/conf:/root/.jupyter:z,rw \
-v /some/path/data:/jupyter/data:z,rw \
--name jupyter \
jupyter:latest
```
## system-toolbox ## system-toolbox
Fedora based container wih preinstalled many usefull tools for various debug and problem searching purposes Fedora based container wih preinstalled many usefull tools for various debug and problem searching purposes

49
jupyter/Containerfile Normal file
View file

@ -0,0 +1,49 @@
FROM registry.fedoraproject.org/fedora-minimal:39
ENV VIRTUAL_ENV=/venv
ENV PATH=/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PKGS_DNF="python nodejs latex xelatex"
ENV PKGS_DNF_BUILD="cargo"
ENV PKGS_PIP="jupyter \
bash_kernel \
mariadb_kernel \
jedi-language-server \
jupyterlab-lsp \
python-lsp-server[all] \
JLDracula \
"
ENV PKGS_NPM="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 dnf5 install -y ${PKGS_DNF} ${PKGS_DNF_BUILD} && \
mkdir /jupyter && \
cd /jupyter && \
npm install ${PKGS_NPM} && \
python3 -m venv /venv && \
pip install -U pip && \
pip install ${PKGS_PIP} && \
python -m bash_kernel.install && \
python -m mariadb_kernel.install && \
cargo install --git https://github.com/latex-lsp/texlab --locked && \
mv /root/.cargo/bin/texlab /usr/bin/ && \
rpm -e --nodeps systemd && \
rm -rf /root/.cache/* /root/.cargo && \
dnf5 remove -y ${PKGS_DNF_BUILD} && \
dnf5 autoremove -y && \
dnf5 clean all
WORKDIR /jupyter
ENTRYPOINT [ "jupyter" ]
CMD [ "notebook", "--allow-root", "--no-browser", "--autoreload" ]