Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build system #119

Merged
merged 27 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7ebc31a
feat: replace deprecated option in config with new ones
NikitaZotov Nov 14, 2024
9b64871
feat: remove run_sc_server.sh
NikitaZotov Nov 14, 2024
892c614
scripts: remove install deps, build and run scripts
NikitaZotov Dec 13, 2024
0408608
docs: apply changes
NikitaZotov Dec 13, 2024
167ce23
ci: remove running sc-machine
NikitaZotov Dec 13, 2024
e80c9b7
docs: update readme
NikitaZotov Dec 22, 2024
9af2b32
git: ignore .DS_store
NikitaZotov Dec 22, 2024
07af5eb
docs: apply changes
NikitaZotov Dec 23, 2024
a308b46
docs: describe build and run submodules
NikitaZotov Dec 23, 2024
262882a
scripts: remove install platform scripts
NikitaZotov Dec 23, 2024
6aa890e
docs: apply changes
NikitaZotov Dec 23, 2024
63d1894
ci: install submobules
NikitaZotov Dec 25, 2024
e8114f4
scripts: revert stage
NikitaZotov Dec 25, 2024
a3614d8
docker: update path to sc-machine binaries
NikitaZotov Jan 13, 2025
082d945
docker: add path to sc-machine extensions
NikitaZotov Jan 13, 2025
1266b70
feat(docker): set sc-server host to 0.0.0.0 by default
NikitaZotov Jan 13, 2025
020504b
docs: fix links in readme
NikitaZotov Jan 31, 2025
5f7c4a2
docs: rename machine to sc-machine in changelog
NikitaZotov Jan 31, 2025
8265895
docker: update names in docker-compose
NikitaZotov Jan 31, 2025
c5f432f
docs: bump license
NikitaZotov Jan 31, 2025
6485302
refactor: rename kb to knowledge-base
NikitaZotov Jan 31, 2025
0855b60
docs: fix sc-machine export
NikitaZotov Jan 31, 2025
33c6470
docs: add build missing
NikitaZotov Jan 31, 2025
9f51a9f
docs: fix paths to sc-machine binaries and paths to sc-web
NikitaZotov Feb 3, 2025
c9d9b3f
feat(config): remove default extensions path
NikitaZotov Feb 3, 2025
e2132d8
docs: fix paths to sc-machine binaries
NikitaZotov Feb 3, 2025
ec0bb6a
feat(config): add ellipsis config
NikitaZotov Feb 3, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
run: |
cd scripts
./set_vars.sh
./install_platform.sh
./install_submodules.sh
3 changes: 1 addition & 2 deletions .github/workflows/minimal_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jobs:
run: |
cd scripts
./set_vars.sh
./install_minimal_platform.sh
./run_sc_machine.sh -t
./install_minimal_submodules.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ build
.idea
__pycache__
.vscode
.DS_Store

# texstudio
*.aux
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Unless otherwise indicated, the Source Code is licensed under the MIT license.

Copyright (c) 2010-2024 OSTIS
Copyright (c) 2010-2025 OSTIS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
70 changes: 45 additions & 25 deletions README.md
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://github.com/ostis-ai/ostis-web-platform/actions/workflows/main.yml/badge.svg?branch=develop"> [![license](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). Platform OSTIS is intended to be a solid framework to help you deploy existing and create new ostis-systems.
It is the repository of the Platform of the [OSTIS Technology](https://github.com/ostis-ai). OSTIS Platform is intended to be a solid framework to help you deploy existing and create new ostis-systems.

OSTIS Platform contains:

Expand Down Expand Up @@ -59,33 +59,54 @@ To learn more about the platform, check out our [documentation](https://github.c
```sh
git clone https://github.com/ostis-ai/ostis-web-platform --recursive
cd ostis-web-platform
./scripts/install_submodules.sh # download all submodules without compilation.
# download all submodules
./scripts/install_submodules.sh
# build sc-machine, scp-machine and sc-component-manager
docker compose build
```

</details>

- Natively (using sc-component-manager)

```sh
git clone https://github.com/ostis-ai/ostis-web-platform
cd ostis-web-platform
./scripts/install_minimal_platform.sh
./scripts/run_sc_machine.sh
# and write write the following commands in the terminal:
# components init
# components install sc_web
# components install knowledge_base_ims
```

- Natively

Note: Currently, only Linux (Ubuntu-20.04, Ubuntu-22.04) and macOS are supported by this installation method. If you're going to use it, it might take a while to download dependencies and compile the components. Use it only if you know what you're doing!
Note: Currently, only Linux (Ubuntu-22.04, Ubuntu-24.04) and macOS are supported by this installation method.

```sh
git clone https://github.com/ostis-ai/ostis-web-platform --recursive
cd ostis-web-platform
./scripts/install_platform.sh
./scripts/install_submodules.sh

# to build sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#start-develop-sc-machine-with-conan
cd sc-machine
# make sure, that you have `conan`, updated `cmake` and `ninja`
cmake --preset release-conan
cmake --build --preset release
conan install . --build=missing
conan export-pkg .
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
cd ..

# to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-scp-machine-with-conan
cd scp-machine
conan install . -s build_type=Debug --build=missing
cmake --preset debug-conan
cmake --build --preset debug
cd ..

# to build sc-component-manager, see https://ostis-ai.github.io/sc-component-manager/build/quick_start/#start-develop-sc-component-manager-with-conan
cd sc-component-manager
conan install . -s build_type=Debug --build=missing
cmake --preset debug-conan
cmake --build --preset debug
cd ..

# to build sc-web, see https://github.com/ostis-ai/sc-web/blob/main/README.md
cd sc-web
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
./scripts/install_dependencies.sh
npm run build
source .venv/bin/activate
python3 server/app.py
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved

# after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
```

## Usage
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -94,7 +115,8 @@ To learn more about the platform, check out our [documentation](https://github.c

```sh
# build the knowledge base
# required before the first startup (or if you've made updates to KB sources)
# required before the first startup
# (or if you've made updates to knowledge base sources)
docker compose run machine build
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
# start platform services and run web interface at localhost:8000
docker compose up
Expand All @@ -103,11 +125,10 @@ To learn more about the platform, check out our [documentation](https://github.c
- Native installation

```sh
# launch semantic network processing machine
./scripts/run_sc_machine.sh
# *in another terminal*
# launch semantic interfaces interpreter at localhost:8000
./scripts/run_sc_web.sh
# to run sc-machine, see https://ostis-ai.github.io/sc-machine/build/quick_start/#run-sc-machine-in-debug
./sc-machine/build/Debug/bin/sc-builder -i repo.path -o kb.bin --clear
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
./sc-machine/build/Debug/bin/sc-machine -s kb.bin \
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
-e "sc-machine/build/Debug/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions"
kilativ-dotcom marked this conversation as resolved.
Show resolved Hide resolved
```

## Documentation
Expand All @@ -117,8 +138,7 @@ to provide opportunity to use it in information processing and knowledge generat

You can access the current version of the documentation in [docs/main.pdf](docs/main.pdf) file of this project.

Documentation is written with
the help of LaTeX tools in SCn-code representation. To build documentation manually, you'll need a LaTeX distribution installed on your computer. Alternatively, we provide a Docker image to build the documentation in case you can't / don't want to install LaTeX on your PC.
Documentation is written with the help of LaTeX tools in SCn-code representation. To build documentation manually, you'll need a LaTeX distribution installed on your computer. Alternatively, we provide a Docker image to build the documentation in case you can't / don't want to install LaTeX on your PC.

### Download scn-tex-plugin and documentation for subprojects

Expand Down
19 changes: 11 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
web:
image: ostis/sc-web:0.8.1-Unlock
image: ostis/sc-web:0.9.0
build:
context: ./interface/sc-web
restart: unless-stopped
Expand All @@ -15,12 +15,13 @@ services:
condition: service_healthy

machine:
image: ostis/sc-machine:0.9.0-Unlock
image: ostis/sc-machine:0.10.0
build:
context: ./sc-machine
restart: unless-stopped
volumes:
- ./:/kb
# TODO(NikitaZotov): Don't load all project sources to volume to build knowledge-base.
- ./:/knowledge-base
- kb-binary:/kb.bin
networks:
- sc-machine
Expand All @@ -31,13 +32,15 @@ services:
interval: 5s
timeout: 10s
retries: 3
start_period: 120s
# start_period: 120s
environment:
# Use the commented env variable if you need to rebuild KB every startup.
# Use the commented env variable if you need to rebuild KB every startup. Also, use commented start period.
#- "REBUILD_KB=1"
- "KB_PATH=/kb/repo.path"
- "BINARY_PATH=/sc-machine/bin"
- "CONFIG_PATH=/kb/ostis-web-platform.ini"
- "KB_PATH=/knowledge-base/repo.path"
- "BINARY_PATH=/sc-machine/build/Release/bin"
- "EXTENSIONS_PATH=/sc-machine/build/Release/lib/extensions"
- "CONFIG_PATH=/knowledge-base/ostis-web-platform.ini"
- "SC_SERVER_HOST=0.0.0.0"
command:
- "run"

Expand Down
19 changes: 14 additions & 5 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Breaking changes

- All build and run scripts have been removed. This was done due to changes in the build system of the sc-machine. So now this repository is most suitable for developers, not for consumers.

### Added

- Script `run_sc_machine.sh`
- Script `build_scp_machine.sh`
- Install scp-machine
- Script `install_minimal_platform.sh`
- Script `build_platform.sh`
- Script `install_minimal_submodules.sh`
- Script `update_submodules.sh`
- Script `build_sc_component_manager.sh`
- Install sc-component-manager

### Changed
Expand All @@ -26,6 +26,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Option `--update` in `install_submodules.sh`

### Removed

- Script `run_sc_server.sh`
- Script `run_sc_web.sh`
- Script `build_kb.sh`
- Script `build_sc_machine.sh`
- Script `install_dependencies.sh`
- Script `install_platform.sh`

## [0.9.0-Unlock] - 22.01.2024

### Changes
Expand Down
11 changes: 5 additions & 6 deletions ostis-web-platform.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ dump_memory_period = 3600
dump_memory_statistics = false
dump_memory_statistics_period = 1200

repo_path = kb.bin
extensions_path = sc-machine/bin/extensions
storage = kb.bin
extensions = sc-machine/bin/extensions

log_type = Console
log_file = sc-machine/sc-memory.log
Expand All @@ -35,11 +35,10 @@ log_file = sc-machine/sc-server.log
log_level = Info

[sc-builder]
log_file = sc-machine/scripts/sc_builder.log

input_path = repo.path
input = repo.path
output = kb.bin

[sc-component-manager]
knowledge_base_components_path = kb
knowledge_base_components_path = knowledge-base
problem_solver_components_path = problem-solver
interface_components_path = interface
4 changes: 2 additions & 2 deletions repo.path
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ostis-web-platform
kb
knowledge-base

# component manager
sc-component-manager/kb
sc-component-manager/knowledge-base
9 changes: 0 additions & 9 deletions scripts/build_kb.sh

This file was deleted.

14 changes: 0 additions & 14 deletions scripts/build_platform.sh

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/build_sc_component_manager.sh

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/build_sc_machine.sh

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/build_sc_web.sh

This file was deleted.

9 changes: 0 additions & 9 deletions scripts/build_scp_machine.sh

This file was deleted.

45 changes: 0 additions & 45 deletions scripts/install_dependencies.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@ SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
SUBMODULE_SCRIPTS_DIR="${SCRIPTS_DIR}/submodule-scripts"
source "${SCRIPTS_DIR}/formats.sh"

stage "Install ostis-web-platform"
stage "Clone submodules"

"${SUBMODULE_SCRIPTS_DIR}/install_sc_machine.sh"
"${SCRIPTS_DIR}/install_sc_machine_dependencies.sh" --dev
"${SUBMODULE_SCRIPTS_DIR}/install_scp_machine.sh"
"${SUBMODULE_SCRIPTS_DIR}/install_sc_component_manager.sh"
"${SCRIPTS_DIR}/build_sc_machine.sh"
"${SCRIPTS_DIR}/build_scp_machine.sh"
"${SCRIPTS_DIR}/build_sc_component_manager.sh"
"${SCRIPTS_DIR}/build_kb.sh"

stage "ostis-web-platform is installed successfully"
stage "Submodules cloned successfully"
Loading