diff --git a/.forgejo/workflows/build-images.yml b/.forgejo/workflows/build-images.yml index c07fe85..7911dc5 100644 --- a/.forgejo/workflows/build-images.yml +++ b/.forgejo/workflows/build-images.yml @@ -6,6 +6,8 @@ on: schedule: - cron: '30 5 */10 * *' +env: + IMAGES: system-toolbox cloud-toolbox tor zabbix-agent snowflake jupyter jobs: build-images-arm64: runs-on: [ arm64 ] @@ -19,8 +21,7 @@ jobs: run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud - name: Build selected images run: | - IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake); - for image in "${IMAGES[@]}"; + for image in ${IMAGES}; do echo "building image $image"; podman build ./$image --tag forgejo.maciej.cloud/pkg/$image:arm64; @@ -39,8 +40,7 @@ jobs: run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud - name: Build selected images run: | - IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake); - for image in "${IMAGES[@]}"; + for image in ${IMAGES}; do echo "building image $image"; podman build ./$image --tag forgejo.maciej.cloud/pkg/$image:amd64; @@ -57,8 +57,7 @@ jobs: run: podman login -u "${{ secrets.PACKAGES_USERNAME }}" -p "${{ secrets.PACKAGES_PASSWD }}" forgejo.maciej.cloud - name: Create manifests and push run: | - IMAGES=(system-toolbox cloud-toolbox tor zabbix-agent snowflake); - for image in "${IMAGES[@]}"; + for image in ${IMAGES}; do echo "Updating manifest for $image"; podman manifest create forgejo.maciej.cloud/pkg/$image:latest forgejo.maciej.cloud/pkg/$image:amd64 forgejo.maciej.cloud/pkg/$image:arm64; diff --git a/README.md b/README.md index 2f5a3e7..3e9139f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,26 @@ # Containers-Workspace 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 Fedora based container wih preinstalled many usefull tools for various debug and problem searching purposes diff --git a/jupyter/Containerfile b/jupyter/Containerfile new file mode 100644 index 0000000..fdf7c03 --- /dev/null +++ b/jupyter/Containerfile @@ -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 python3-devel" + +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", "--ip", "0.0.0.0" ]