-
Install podman. https://podman.io/getting-started/installation
-
Install podman-compose:
pip install podman-compose
-
Clone or copy
docker-compose.yml
andconfig.yml
from this gist into a directory. -
From inside that directory, start
podman-compose
.TILED_SINGLE_USER_API_KEY=secret podman-compose up
This should start MongoDB and a Tiled server. The server is ready when you see
INFO: Started server process [1] INFO: Waiting for application startup. OBJECT CACHE: Will use up to 10_095_076_147 bytes (15% of total physical RAM) INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Later, when finished, stop it like this. This must be run to clean up before
up
is run again.podman-compose down
-
Connect from the client.
pip install --upgrade tiled[client] ipython ipython
In [1]: from tiled.client import from_uri, show_logs In [2]: c = from_uri("http://localhost:8000?api_key=secret") In [3]: c Out[3]: <Node {}> In [4]: c.write_array([1,2,3], metadata={"color": "yellow"}) Out[4]: <ArrayClient shape=(3,) chunks=((3,),) dtype=int64> In [5]: c Out[5]: <Node {'9f13ebd6-a9ad-48f8-a79b-dddcdacbc03c'}>
The data is stored across a MongoDB database and files. It is persisted in the directories ./db_data
and ./file_data
, created in the current directory when podman-compose up
is first run. To clear the data, delete those directories.