Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Codeserver
on:
push:
branches:
- feature/*

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ghcr.io/${{ github.repository }}
- name: lowercase github.repository
run: |
echo "lc_repository=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV}

- name: Build Docker Image
uses: docker/build-push-action@v5
with:
file: deployment/Dockerfile
push: false
platforms: linux/amd64,linux/arm64
tags: |
${{ steps.meta.outputs.tags }}

189 changes: 189 additions & 0 deletions Project/examples/versions.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"id": "a1a31dd4",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Swift version 6.2 (swift-6.2-RELEASE)\n",
"Target: aarch64-unknown-linux-gnu\n"
]
}
],
"source": [
"swift --version\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "4f5f17cb",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python 3.12.3\n"
]
}
],
"source": [
"python --version\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "e68d83ed",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"This is perl 5, version 38, subversion 2 (v5.38.2) built for aarch64-linux-gnu-thread-multi\n",
"(with 51 registered patches, see perl -V for more detail)\n",
"\n",
"Copyright 1987-2023, Larry Wall\n",
"\n",
"Perl may be copied only under the terms of either the Artistic License or the\n",
"GNU General Public License, which may be found in the Perl 5 source kit.\n",
"\n",
"Complete documentation for Perl, including FAQ lists, should be found on\n",
"this system using \"man perl\" or \"perldoc perl\". If you have access to the\n",
"Internet, point your browser at https://www.perl.org/, the Perl Home Page.\n",
"\n"
]
}
],
"source": [
"perl --version\n"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "8c53340b",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"PHP 8.3.6 (cli) (built: Jul 14 2025 18:30:55) (NTS)\n",
"Copyright (c) The PHP Group\n",
"Zend Engine v4.3.6, Copyright (c) Zend Technologies\n",
" with Zend OPcache v8.3.6, Copyright (c), by Zend Technologies\n"
]
}
],
"source": [
"php -v"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "9ac19af9",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio\n"
]
}
],
"source": [
"lua -v"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "4fc685d2",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball)\n"
]
}
],
"source": [
"rustc --version"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "e1bc6e37",
"metadata": {
"vscode": {
"languageId": "shellscript"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"v22.20.0\n"
]
}
],
"source": [
"node --version"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Bash",
"language": "bash",
"name": "bash"
},
"language_info": {
"codemirror_mode": "shell",
"file_extension": ".sh",
"mimetype": "text/x-sh",
"name": "bash"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
8 changes: 4 additions & 4 deletions codebook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
#
# Setup script to run CodeBook on current folder
#
# curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/codebook.sh | sh -
# curl https://raw.githubusercontent.com/aus-der-Technik//CodeBook/main/codebook.sh | sh -
#

set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/" >/dev/null 2>&1 && pwd)"
if [ ! -f "${SCRIPT_DIR}/.env" ]; then
curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/.env >> .env
curl https://raw.githubusercontent.com/aus-der-Technik//CodeBook/main/.env >> .env
fi
if [ ! -f "${SCRIPT_DIR}/docker-compose.yaml" ]; then
curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/docker-compose.yaml >> "${SCRIPT_DIR}/docker-compose.yaml"
curl https://raw.githubusercontent.com/aus-der-Technik//CodeBook/main/docker-compose.yaml >> "${SCRIPT_DIR}/docker-compose.yaml"
fi
if [ ! -f "${SCRIPT_DIR}/settings.json" ]; then
curl https://raw.githubusercontent.com/KrisSimon/CodeBook/main/settings.json >> "${SCRIPT_DIR}/settings.json"
curl https://raw.githubusercontent.com/aus-der-Technik//CodeBook/main/settings.json >> "${SCRIPT_DIR}/settings.json"
fi
if [ ! -d "${SCRIPT_DIR}/startup" ]; then
mkdir "${SCRIPT_DIR}/startup"
Expand Down
67 changes: 48 additions & 19 deletions deployment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# ----------------------------------------------------------------------------------------
# DOWNLOADER
# ----------------------------------------------------------------------------------------
ARG BASEIMAGE=ubuntu:24.04
FROM ${BASEIMAGE} AS downloader

# Install OS updates and, if needed
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update && apt-get install -y apt-utils \
apt-transport-https \
software-properties-common \
-y

RUN apt install -y \
curl wget

WORKDIR /downloads

# kubectl
RUN SYSARCH=$(arch); \
if [ "$SYSARCH" = "aarch64" ]; then SYSARCH=arm64; fi; \
if [ "$SYSARCH" = "x86_64" ]; then SYSARCH=amd64; fi; \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${SYSARCH}/kubectl"; \
chmod 755 /downloads/kubectl

# Helm
RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3; \
chmod 700 /downloads/get_helm.sh;

# Spark
RUN wget https://archive.apache.org/dist/spark/spark-3.5.5/spark-3.5.5-bin-hadoop3.tgz

# Swiftly
RUN curl -o swiftly.tar.gz -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz

# ----------------------------------------------------------------------------------------
# BUILD STAGE
# ----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -28,26 +63,20 @@ RUN apt install -y \
glibc-tools gcc \
cmake \
golang \
libzmq3-dev libsodium23 pkg-config python3-aiozmq \
libsodium23 pkg-config \
lldb-15 rust-all \
openjdk-8-jdk \
lua-any lua-argparse lua-check lua-cjson lua-doc lua-event lua-filesystem lua-http lua-json lua-posix lua-socket lua-system lua5.4 luadoc luajit \
tzdata \
kubecolor kubectx \
php composer

# kube
RUN SYSARCH=$(arch); \
if [ "$SYSARCH" = "aarch64" ]; then SYSARCH=arm64; fi; \
if [ "$SYSARCH" = "x86_64" ]; then SYSARCH=amd64; fi; \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${SYSARCH}/kubectl"; \
chmod 755 kubectl; \
mv kubectl /usr/local/bin/
# kubectl
COPY --from=downloader /downloads/kubectl /usr/local/bin/

# helm
RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null; \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list; \
apt-get update; apt-get install helm -y;
COPY --from=downloader /downloads/get_helm.sh /tmp/get_helm.sh
RUN /tmp/get_helm.sh

# fix LLDB
RUN apt install python3-lldb-14 -y; \
Expand All @@ -61,33 +90,30 @@ RUN pip install setuptools --break-system-packages
RUN mkdir /project && chmod 777 /project
COPY ./Sources/entrypoint.sh /


# Install Python
# ----------------------------------------------------------------------------------------
RUN ln -s /usr/bin/python3 /usr/bin/python

# Install Spark
# ----------------------------------------------------------------------------------------
WORKDIR /opt/spark
RUN wget https://archive.apache.org/dist/spark/spark-3.5.5/spark-3.5.5-bin-hadoop3.tgz; \
tar -xvzf spark-3.5.5-bin-hadoop3.tgz; \
COPY --from=downloader /downloads/spark-3.5.5-bin-hadoop3.tgz /opt/spark/spark-3.5.5-bin-hadoop3.tgz
RUN tar -xvzf spark-3.5.5-bin-hadoop3.tgz; \
rm spark-3.5.5-bin-hadoop3.tgz
ENV SPARK_HOME=/opt/spark/spark-3.5.5-bin-hadoop3
RUN echo 'SPARK_HOME=/opt/spark/spark-3.5.5-bin-hadoop3' >> /root/.bashrc
RUN echo 'PATH="$JAVA_HOME/bin:$SPARK_HOME/bin:$PATH"' >> /root/.bashrc
RUN pip install findspark --break-system-packages


# Install Swift
# ----------------------------------------------------------------------------------------
WORKDIR /opt/swiftly
RUN curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz && \
tar zxf swiftly-$(uname -m).tar.gz && \
COPY --from=downloader /downloads/swiftly.tar.gz /opt/swiftly/swiftly.tar.gz
RUN tar zxf swiftly.tar.gz && \
./swiftly init --quiet-shell-followup -y && \
. ~/.local/share/swiftly/env.sh && \
hash -r \
RUN echo 'source /root/.local/share/swiftly/env.sh' >> /root/.bashrc

RUN /root/.local/share/swiftly/bin/swift --version

# Install NodeJS
Expand Down Expand Up @@ -120,7 +146,10 @@ RUN rm -rf /extensions/install/*
RUN pip install ipywidgets --break-system-packages
RUN pip install bash_kernel --break-system-packages; python3 -m bash_kernel.install
RUN npm install -g tslab --break-system-packages; tslab install;

RUN apt install -y libzmq3-dev python3-aiozmq # need to install it late, because of some python dependencies
RUN cpan -T Alien::ZMQ::latest; cpan -T Devel::IPerl; iperl kernel;

RUN pip install jupyter-c-kernel --break-system-packages; install_c_kernel;
RUN pip install ilua --break-system-packages;
RUN pip install dockerfile-kernel --break-system-packages; python3 -m dockerfile_kernel.install
Expand All @@ -130,7 +159,7 @@ RUN pip install /extensions/kernel/echo_kernel --break-system-packages
RUN pip install /extensions/kernel/swift_kernel --break-system-packages

RUN echo 'PATH="$PATH:/root/.cargo/bin"' >> /root/.bashrc
#RUN cargo install evcxr_jupyter; /root/.cargo/bin/evcxr_jupyter --install;
#RUN cargo install --locked evcxr_jupyter; /root/.cargo/bin/evcxr_jupyter --install;
#cp -r /root/.local/share/jupyter/kernels/rust /extensions/kernel/rust

# Setting the startp
Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
version: '3.7'

# CodeBook Deployment
x-shared_environment: &shared_environment
BASEIMAGE: ${BASEIMAGE}
IMAGE: ${IMAGE}
Expand Down
Loading