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

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
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
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
68 changes: 43 additions & 25 deletions README.md
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,52 @@ 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 debug-conan
cmake --build --preset debug
conan export-pkg .
cd ..

# to build scp-machine, see https://ostis-ai.github.io/scp-machine/build/quick_start/#start-develop-sc-machine-with-conan
cd scp-machine
conan install . -s build_type=Debug
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-machine-with-conan
cd sc-component-manager
conan install . -s build_type=Debug
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
./scripts/install_dependencies.sh
npm run build
python3 server/app.py

# after building projects there should be three folders `build/Debug` in sc-machine, scp-machine and sc-component-manager
```

## Usage
Expand All @@ -94,7 +113,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
# start platform services and run web interface at localhost:8000
docker compose up
Expand All @@ -103,11 +123,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
./sc-machine/build/Debug/bin/sc-machine -s kb.bin \
-e "sc-machine/build/Debug/lib/extensions;scp-machine/build/Debug/lib/extensions;sc-component-manager/build/Debug/lib/extensions"
```

## Documentation
Expand All @@ -117,8 +136,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
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ services:
# Use the commented env variable if you need to rebuild KB every startup.
#- "REBUILD_KB=1"
- "KB_PATH=/kb/repo.path"
- "BINARY_PATH=/sc-machine/bin"
- "BINARY_PATH=/sc-machine/build/Release/bin"
- "EXTENSIONS_PATH=/sc-machine/build/Release/lib/extensions"
- "CONFIG_PATH=/kb/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 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
9 changes: 4 additions & 5 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,9 +35,8 @@ 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
Expand Down
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"
17 changes: 0 additions & 17 deletions scripts/install_platform.sh

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/install_sc_machine_dependencies.sh

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/install_sc_web_dependencies.sh

This file was deleted.

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

This file was deleted.

Loading