Install Dosi manually¶
Using a coding agent? Skip this page
Tell the agent Install Dosi by following https://dosi.datus.ai/agent-install.md
and it installs everything itself; the quickstart
walks through it. For Python, pip install dosi-engine; see the
Python API.
One command installs dosi and dosi-server on Linux or macOS. Nothing else
is needed: no toolchain, no database, no client libraries.
The script downloads the archive for your OS and CPU, checks its SHA-256, and
puts dosi and dosi-server in ~/.local/bin, with DuckDB's library beside
them in the default build. Add that directory to your PATH if it is not
there. The example models go to ~/.local/share/dosi/examples. Run the script
again to upgrade, or to switch between the default and lean builds.
Verify it works¶
$ dosi info
dosi 0.2.2
osi spec 0.3.0.dev0
datus-ext 1.14 (accepts 1.0 and up)
mode datus
build engine (DuckDB in process)
examples /home/you/.local/share/dosi/examples
...
build says which build you have: engine for the default, lean for lean.
examples is where the example models are. These docs refer to that folder
as $DOSI_EXAMPLES, so set it and check that a model loads:
$ export DOSI_EXAMPLES=~/.local/share/dosi/examples
$ dosi validate --model $DOSI_EXAMPLES/orders/model.yaml
✓ 1 semantic model(s) valid
If you see that line, go on to the CLI tutorial.
Which build?¶
Take the default. Choose lean only when the machine has no C++ runtime:
the default build runs DuckDB in process, and DuckDB needs libstdc++
(GLIBCXX_3.4.22, GCC 6 and up). Minimal or distroless images and older
distributions are the usual reason. Both builds compile the same SQL and
reach every warehouse; only local DuckDB queries differ.
| Default | Lean | |
|---|---|---|
| Local DuckDB queries | in process, Arrow-native | through a duckdb CLI on your PATH |
| Files | dosi, dosi-server, libduckdb.so (.dylib on macOS) |
dosi, dosi-server |
| Needs on Linux | glibc 2.28+, libstdc++ | glibc 2.28+ |
With the lean build, a local query (--execute --db) runs the duckdb CLI
on your PATH; without one it fails with cannot start duckdb CLI. Dosi is
verified against DuckDB 1.4.x and warns once about any other version. Results
come back as JSON, so large integers, DECIMAL and TIMESTAMPTZ depend on
the CLI's version. Each statement runs in a new process, so use a database
file, not an in-memory database, when calls need to share state.
Without the install script¶
Download the archive and SHA256SUMS from the
release page, check the
archive, and install the files:
$ VERSION=0.2.2 TARGET=x86_64-unknown-linux-gnu
$ BASE=https://github.com/Datus-ai/dosi-dist/releases/download/v$VERSION
$ curl -fsSLO $BASE/dosi-$VERSION-$TARGET.tar.gz
$ curl -fsSLO $BASE/SHA256SUMS
$ sha256sum --ignore-missing -c SHA256SUMS # macOS: shasum -a 256 -c SHA256SUMS --ignore-missing
$ tar xzf dosi-$VERSION-$TARGET.tar.gz
$ sudo install dosi-$VERSION-$TARGET/dosi dosi-$VERSION-$TARGET/dosi-server /usr/local/bin/
$ sudo install -m 0644 dosi-$VERSION-$TARGET/libduckdb.so /usr/local/bin/
TARGETisx86_64-unknown-linux-gnu,aarch64-unknown-linux-gnuoraarch64-apple-darwin. For the lean build, downloaddosi-$VERSION-$TARGET-lean.tar.gzand skip the last line. The release'smanifest.jsonlists the archives it has and their checksums.- Keep the library beside the executables.
dosianddosi-serverlook forlibduckdb.so(libduckdb.dylibon macOS) in their own directory, and without it fail at startup withcannot open shared object file. Copy it along whenever you move them. - Requirements: Linux with glibc 2.28 or newer (RHEL, Rocky or Alma 8, Ubuntu 20.04, Debian 10 and later; on CentOS 7, use a container), or macOS 11 or newer.
- Also in the archive:
examples/, the example models the install script puts in~/.local/share/dosi/examples, andLICENSE, the Elastic License 2.0.
Install script options¶
Set them before sh, as in curl -fsSL https://dosi.datus.ai/install.sh | DOSI_SHAPE=lean sh.
| Variable | Effect |
|---|---|
DOSI_VERSION |
Install this version, such as 0.2.2, instead of the latest |
DOSI_SHAPE=lean |
Install the lean build |
DOSI_INSTALL_DIR |
Where the executables go (default ~/.local/bin) |
DOSI_SOURCE |
Where to download from: github (default), oss (the Aliyun mirror, for mainland China) or cloudflare. There is no fallback: if the chosen source fails, the install fails |
DOSI_OSS_MIRROR, DOSI_MIRROR |
The base URL of your own OSS or Cloudflare mirror, laid out as v<version>/<file> with the manifest also at latest/manifest.json |
DOSI_MANIFEST_URL |
Read the manifest from exactly this URL |
Next steps¶
-
From the bundled model to real results you can check, in about ten minutes.
-
Point Dosi at Postgres, Snowflake, ClickHouse and more.
-
Load a model and run queries from Python.