FOR RESOURCE PROVIDERSÂ |
 Work in Progress | Services are in active development and are subject to change |
 GridRepublic LLM is a community-powered LLM inference service. The system supports a range of models (and languages), powered by an open network of distributed resource providers, and is available to users worldwide. |
Contents
The GridRepublic LLM client installation is handled by a setup script that checks the status of the current environment and installs dependencies, as needed. Docker is installed and configured automatically. When GPU support is used, setup of the container runtime is also included.
The process also implements security measures to limit the risks associated with running third-party containers. Most notably, the script disables the default, system-wide Docker daemon and configures the Docker rootless context, which instead runs Docker processes as the current user. Additionally, container networks are configured so that network traffic (with the exception of IPFS, if enabled) is restricted and must be run through a dedicated proxy container. This prevents third-party containers from accessing either the local network or arbitrary destinations on the Internet.
For specific details, examine the contents of the setup script.
The GridRepublic LLM environment can be set up by running the following commands:
$ wget -O gr-docker-setup.ubuntu.sh https://www.gridrepublic.org/files/setup/gr-docker-setup.sh.ubuntu $ sh gr-docker-setup.ubuntu.sh |
Usage of the gr-docker-setup.ubuntu.sh script may include a number of optional parameters:
gr-docker-setup.ubuntu.sh [args] OPTIONS --auth // Specify the authenticator to use to connect the host to GridRepublic (if omitted, system will prompt for authenticator) --with-ipfs // Allow use of IPFS content on the host for task input files; this updates the ipfs config file to add a UNIX socket API interface so that files can be fetched --use-gpu // Set up GPU packages and run the client with GPU support --service-mode // Keep container running, fetching and processing new tasks [default] --task-mode // Run a single task, if available, then stop the container |
(To debug, see 2.2 To troubleshoot)
For demo purposes, the following authenticator can be used: |
Once setup has been completed on a system, the GridRepublic LLM client can be managed via Docker:
$ docker [start|stop] gr-client |
To verify that the client is running
$ docker exec -it gr-client gr-ctl --get_host_info |
Depending on the option chosen during installation, running the docker start gr-client command will cause the client to either run a single compute job ("--task-mode"), or continually check for and run compute jobs ("--service-mode" [default]) that have been submitted to the network, until manually stopped. |
To enable GPU support in the GridRepublic LLM client, be sure to specify the --use-gpu option during installation. |
When new features or other improvements have been made to the setup script or GridRepublic LLM client container image, the environment can be upgraded by fetching and running the latest setup script:
$ wget -O gr-docker-setup.ubuntu.sh https://www.gridrepublic.org/files/setup/gr-docker-setup.sh.ubuntu $ sh gr-docker-setup.ubuntu.sh |
Usage of the gr-docker-setup.ubuntu.sh script may include a number of optional parameters:
gr-docker-setup.ubuntu.sh [args] OPTIONS --auth // Specify the authenticator to use to connect the host to GridRepublic (if omitted, system will prompt for authenticator) --with-ipfs // Allow use of IPFS content on the host for task input files; this updates the ipfs config file to add a UNIX socket API interface so that files can be fetched --use-gpu // Set up GPU packages and run the client with GPU support --service-mode // Keep container running, fetching and processing new tasks [default] --task-mode // Run a single task, if available, then stop the container |
(To debug, see 2.2 To troubleshoot)
The GridRepublic LLM client configuration will remain in the ~/.gr directory, so any work that was in progress prior to the upgrade will be continued.
To remove all GridRepublic LLM files and containers from the system:
$ rm -r ~/.gr gr-docker-setup.ubuntu.sh nginx_work_proxy.conf $ docker rm -f gr-client work-proxy |
Note: These commands do not remove Docker CE, NVIDIA container runtime, or other packages that were installed as dependencies, nor do they revert changes to Docker system configuration that might have been made during setup to support rootless mode.
The GridRepublic LLM client configuration and data files are stored in the ~/.gr directory of the account that runs the installation script. To use an alternate location for storage, this location can be created as or replaced with a symbolic link to another filesystem path.
IPFS data is stored in the ~/gr-client/ipfs directory. This location can likewise be set up as a symbolic link to point to an existing IPFS data store or to use a different filesystem for IPFS files.
Launch the container:
$ docker start gr-client |
Once the gr-client container is started,
For details on what is happening, and especially to identify any errors, run:
$ docker logs gr-client |
To capture output from the setup script, append " 2>&1 | tee debug.out
", which will write setup script activity to a file, debug.out
Â
$ sh gr-docker-setup.ubuntu.sh âservice-mode 2>&1 | tee debug.out |
Please contact us with any questions.