Skip to content

Install locally

The shortest path from a fresh clone to a TCKDB API running from source, for working on the code.

Just want to run TCKDB, for yourself or a group? Self-host does it from published images in three commands, with no Conda.

Developer setup from source Six steps. 1, copy .env.example to .env and backend/.env.example to backend/.env. 2, create and activate the tckdb_env conda environment. 3, pip install the tckdb-schemas package, then the backend with its dev extra. 4, make up starts the database and SeaweedFS and runs migrations. 5, make api starts the API on 127.0.0.1:8010. 6, curl the health endpoint and expect status ok. 1 Copy the env files cp .env.example .env cp backend/.env.example backend/.env 2 Create the conda env mamba env create -n tckdb_env … Then: conda activate tckdb_env 3 Install the Python packages pip install -e schemas/python/tckdb-schemas cd backend && pip install -e ".[dev]" 4 Start Postgres and SeaweedFS make up Starts db and seaweedfs, then migrates. 5 Start the API make api Runs in the foreground on 127.0.0.1:8010. 6 Check it curl 127.0.0.1:8010/api/v1/health Expect {"status":"ok"}.

What you need

  • Git.
  • Docker Engine or Docker Desktop with Compose.
  • Conda or Mamba. The environment takes RDKit from conda-forge.
  • A Unix-like shell: Linux, macOS, or WSL on Windows.

Set up

git clone https://github.com/TCKDB/TCKDB.git
cd TCKDB

cp .env.example .env
cp backend/.env.example backend/.env

mamba env create -n tckdb_env -f backend/environment.yml
conda activate tckdb_env
pip install -e schemas/python/tckdb-schemas
cd backend && pip install -e ".[dev]" && cd ..

make up
make api

make up starts Postgres and SeaweedFS in Docker and runs the migrations. make api runs the API in the foreground on 127.0.0.1:8010.

In another terminal:

make doctor
curl http://127.0.0.1:8010/api/v1/health

Expected response:

{"status":"ok"}

TCKDB is running. Until you load or upload records, queries return empty records arrays.

Next

Load the small dataset in Demo data, then try Querying.

Details, administrator accounts and API keys are on Run from source.