Skip to content

installation

Tomo edited this page Feb 16, 2024 · 14 revisions

Installation and Setup

Requirements:

  • A running instance of DreamFactory OSS (See File Server section below)
  • This Repo (for the Roboprop Client)
  • Redis (Easiest method is to simply run a docker container)

Creating Your File Server

At present, We will use the OSS version of DreamFactory as the API to serve our models. DreamFactory has a local storage API out of the box, and so by having an instance running on, e.g. EC2 or DigitalOcean, (or just your computer) we will have full access to our models / files via a RESTful API.

Easiest way to install is through the Docker Repo or by using the installers

Once spun-up, got to localhost in the browser make your first user (this will be the superuser). You can upload files using the files tab if you want to play around here.

You will want to make a role (RBAC) for the Files service, and then an app (i.e API Key) to give to the client. (At present we will not do user based role access for simplicity, but you should if it is available publicly).

To make a role, click on the roles tab, then create, make a name, description, click "active" and click next. On this tab add the "files" service, all components (*), All access (5 selected), and check both boxes for Requester (API and Script), then save.

To make an app, click apps, create, then makes an application name, description, and for "Assign a Default Role", choose the role you just made. Make it Active, click save, and copy the API key generated to your clipboard.

See the guide for more details.

Amendments to the Fileserver

Once you have Dreamfactory setup, because models can be quite large, we suggest looking at / amending the following:

  • For the webserver, increasing the maximum file size (in nginx this is client_max_body_size)
  • For php.ini, increasing upload_max_filesize and post_max_size as well as memory_limit(on ubuntu systems in /etc/php/8.1/fpm/php.ini)

Installing and Setting Up the Client

The Clientside program is this repo, which is a Django Project (roboprop) and Django app (roboprop_client). To install:

Required: Python version 3.10.x

Development

git clone git@github.com:art-e-fact/RoboProp.git
cd RoboProp
pip install -r requirements-dev.txt
pip install -r requirements.txt
python manage.py makemigrations #should return no changes detected
python manage.py migrate
npm install
npx tailwindcss -i ./static/src/input.css -o ./static/src/output.css

You will then want to rename example.env to .env and add the location of your fileserver (if local development it will be http://localhost/api/v2/files) and the api key you generated for the filserver (as above section). You should also set the redis location if different from the default set out in example.env

Blenderkit Pro

If you have a subscription to Blenderkit and wish to use "paid" models when searching Roboprop, add your API key to .env with the variable BLENDERKIT_PRO_API_KEY

You can get your API key by adding Blenderkit to Blender as an addon, and then copying the Api key from the Blenderkit add on settings page. Alternatively you can log into blenderkit.com and go to you "Account" page

Production

Coming Soon!