From 83d61a84b03670e512ba3e447b2e374df96451d6 Mon Sep 17 00:00:00 2001 From: danregima <10253941+danregima@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:29:53 +0000 Subject: [PATCH] Add devcontainer and automations configuration Replaces the stub .devcontainer/devcontainer.json (which referenced an empty Dockerfile) with a working configuration based on mcr.microsoft.com/devcontainers/base:ubuntu-24.04 plus Python and Node.js features. Adds .ona/automations.yaml migrating tasks from .gitpod.yml: - install-deps: installs apt and pip packages on postDevcontainerStart - setup-env: runs .gitpod/setup.sh to configure env vars and build scripts - build-opencog: manual trigger to build cogutil/atomspace/cogserver The .gitpod.yml welcome-message command task was dropped as it has no automation value. Co-authored-by: Ona --- .devcontainer/devcontainer.json | 36 +++++++++++++++++++++ .ona/automations.yaml | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .ona/automations.yaml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..6e25094e4 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,36 @@ +{ + "name": "OpenCog", + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04", + "features": { + "ghcr.io/devcontainers/features/python": {}, + "ghcr.io/devcontainers/features/node": {} + }, + "forwardPorts": [17001, 18001, 5000, 8080], + "portsAttributes": { + "17001": { + "label": "CogServer Telnet", + "onAutoForward": "ignore" + }, + "18001": { + "label": "CogServer Web", + "onAutoForward": "ignore" + }, + "5000": { + "label": "REST API", + "onAutoForward": "ignore" + }, + "8080": { + "label": "Web Demos", + "onAutoForward": "notify" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "ms-vscode.cmake-tools", + "ms-python.python" + ] + } + } +} diff --git a/.ona/automations.yaml b/.ona/automations.yaml new file mode 100644 index 000000000..e30a7dc9b --- /dev/null +++ b/.ona/automations.yaml @@ -0,0 +1,57 @@ +tasks: + install-deps: + name: Install system dependencies + description: Install C++/CMake build tools and Python packages required for OpenCog. + command: | + sudo apt-get update -qq && sudo apt-get install -y \ + build-essential \ + cmake \ + cmake-data \ + libboost-all-dev \ + libcppunit-dev \ + guile-3.0-dev \ + libbz2-dev \ + libexpat1-dev \ + libgsl-dev \ + libhyphen-dev \ + libpthread-stubs0-dev \ + libtool \ + libzmq3-dev \ + pkg-config \ + python3-dev \ + python3-pip \ + python3-numpy \ + python3-scipy \ + cython3 \ + python3-nose \ + unzip \ + wget \ + curl \ + locales \ + locales-all + pip3 install --user numpy scipy matplotlib cython pytest networkx scikit-learn pandas + triggeredBy: + - postDevcontainerStart + + setup-env: + name: Set up build environment + description: Configure environment variables and create build helper scripts. + command: | + chmod +x .gitpod/*.sh + chmod +x ./setup-opencog-gitpod.sh + bash .gitpod/setup.sh + triggeredBy: + - postDevcontainerStart + dependsOn: + - install-deps + + build-opencog: + name: Build OpenCog + description: Build core OpenCog components (cogutil, atomspace, cogserver) in dependency order. + command: | + source ~/.bashrc + build-opencog + triggeredBy: + - manual + dependsOn: + - setup-env