TinyChain Platform
  • What is TinyChain?
  • Guides
    • Getting Started
    • Python client introduction
    • Types and casting
    • Anatomy of an Op
    • Flow control: after, cond, while_loop
    • Closures and functional programming
    • Install a Library or Service
    • Code a compute graph
    • Debugging
    • Ask for help
  • Fundamentals
    • Install TinyChain
    • Technical Details
  • Advanced
    • Client-side Class Inheritance
  • Use Cases
    • For Engineers
    • For Data Scientists
    • For DevOps
    • For Product Owners & Executives
    • For End-Users
Powered by GitBook
On this page
  • Client
  • Host
  • Easy install
  • Automatic install (Ubuntu)
  • Manual install
  • systemd configuration
  1. Fundamentals

Install TinyChain

Install the TinyChain host software

PreviousAsk for helpNextTechnical Details

Last updated 9 months ago

Client

Most users will only need to run the TinyChain Python client, not a TinyChain host. See the Python client introduction for instructions to install the client.

Host

Easy install

The quick and easy way to get TinyChain up and running to try it out is to use Docker:

# build the Dockerfile from the GitHub repo, then run a new container with TinyChain listening on host port 8702
# the "-it" option also opens an interactive terminal
docker run -it -p 8702:8702/tcp $(docker build https://github.com/haydnv/tinychain.git -q) ./tinychain --data_dir=/tmp/data

You can check that your installation succeeded by loading in your browser.

Automatic install (Ubuntu)

An install script is provided for Ubuntu (only tested on Ubuntu 20.04):

curl https://raw.githubusercontent.com/haydnv/tinychain/master/bin/install.sh -sSf | bash

Manual install

  1. (optional) If you need CUDA support for GPU acceleration, first install CUDA 11 by following the instructions here: . If you're not sure, skip this step.

  2. Install cargo by following the instructions here:

  3. Install TinyChain by running cargo install tinychain

systemd configuration

# This is an example systemd service config for TinyChain.

[Unit]
Description=Tinychain
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=2

# change this user name!
User=root

# change this path to match your Tinychain install path
ExecStart=/root/tinychain/host/target/release/tinychain --data_dir=/tmp/data --cache_size=4G

[Install]
WantedBy=multi-user.target

To use TinyChain in production, you'll probably want to configure so that TinyChain will automatically restart in the case of a crash or a host machine restart. You can find detailed instructions on how to configure a new service with systemd . You can customize this example systemd config file for your use-case:

http://127.0.0.1:8702/state/scalar/value/string?key="Hello, World!"
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#ubuntu-installation
https://doc.rust-lang.org/cargo/getting-started/installation.html
systemd
here