|
| 1 | +======================== |
| 2 | +AppAPI and External Apps |
| 3 | +======================== |
| 4 | + |
| 5 | +.. _ai-app_api: |
| 6 | + |
| 7 | +Previously, Nextcloud only supported applications written in the PHP programming language. |
| 8 | +In order to support a wider range of use cases, |
| 9 | +an ecosystem for **ExApps** (short for "External Apps") was introduced, allowing for the installation of apps as Docker containers. |
| 10 | + |
| 11 | +Most of our :doc:`Artificial Intelligence <../ai/index>` (AI) apps are developed as ExApps and thus may require some preparation of your Nextcloud instance before you can install them. |
| 12 | + |
| 13 | +Installing AppAPI |
| 14 | +----------------- |
| 15 | + |
| 16 | +All ExApps require the `AppAPI <https://apps.nextcloud.com/apps/app_api>`_ Nextcloud app as a dependency. |
| 17 | +As of Nextcloud version 30.0.1, AppAPI is automatically installed by default. |
| 18 | +If AppAPI is not installed, you can still install it by simply navigating to the Apps management page in your Nextcloud instance and search for AppAPI from the Tools category. |
| 19 | + |
| 20 | +Setup deploy daemon |
| 21 | +------------------- |
| 22 | + |
| 23 | +A Deploy Daemon is a way for Nextcloud to install, communicate with, and control ExApps. |
| 24 | + |
| 25 | +.. note:: |
| 26 | + If you are using Nextcloud AIO with the "Docker Socket Proxy" container enabled, a Deploy Daemon will be automatically created and configured to work out-of-the-box. |
| 27 | + Otherwise, follow the steps below to set up a Deploy Daemon from the AppAPI admin settings. |
| 28 | + |
| 29 | +1. Setup a Docker container called `docker-socket-proxy <https://github.com/nextcloud/docker-socket-proxy#readme>`_ that proxies access to Docker for your Nextcloud instance. |
| 30 | +2. Go to the AppAPI admin settings. |
| 31 | +3. Click on the "Register Daemon" button. |
| 32 | +4. Fill in the required fields: |
| 33 | + - ``Name``: unique name of the Deploy daemon |
| 34 | + - ``Display name``: the name that will be displayed in the UI |
| 35 | + - ``Deployment method``: by default, you will need to choose ``docker_install`` (``manual_install`` is for development or custom use case of manual ExApp installation) |
| 36 | + - ``Daemon Host``: hostname/IP address + port of the Deploy daemon |
| 37 | + - ``Nextcloud URL``: autofilled with current domain, you might need to change the protocol to http/https depending on your setup |
| 38 | + - ``Set as default daemon``: check if you want set new Deploy daemon as default |
| 39 | + - ``Enable https``: check if your Deploy daemon (Docker Socket Proxy) is configured with TLS |
| 40 | + - Deploy Config: |
| 41 | + - ``Network``: Docker network name, depends on your networking setup, enforces to "host" if "Enable https" is checked |
| 42 | + - ``HaProxy password``: password for Docker Socket Proxy, if it is configured with TLS |
| 43 | + - ``Compute Device``: CPU, CUDA or ROCm, depending on your hardware config on Deploy daemon host machine |
| 44 | + - ``Add additional option`` (see :ref:`additional_options_list`): setup additional KEY + VALUE deploy config options |
| 45 | +5. Click "Check connection" to verify that the configuration is correct. |
| 46 | +6. Click "Register" to save the Deploy Daemon configuration. |
| 47 | + |
| 48 | +.. note:: |
| 49 | + For remote DSP setup, it should expose the ports on the host. |
| 50 | + |
| 51 | +.. image:: ./img/app_api_3.png |
| 52 | + |
| 53 | +Deployment configuration examples can be found :doc:`here <./DeployConfigurations>`. |
| 54 | + |
| 55 | +Installing ExApps |
| 56 | +----------------- |
| 57 | + |
| 58 | +You can now install ExApps from the Nextcloud App Store by clicking "Install" on the respective app in the Apps page. |
| 59 | +If successful, the ExApp will be displayed under the "Your apps" list. |
| 60 | + |
| 61 | +.. image:: ./img/exapp_list_example.png |
| 62 | + |
| 63 | +FAQ |
| 64 | +--- |
| 65 | + |
| 66 | +* I have two graphics cards XXX with 6/8/Y GB of ram each. How can I run something which does not fit into one graphics card? |
| 67 | + * Distributing models across multiple GPUs is currently not supported. You will need a GPU that fits all of the model you are trying to use. |
| 68 | +* I have YYY graphics card that does not supports CUDA - can I use it and how? |
| 69 | + * No, our AI apps require GPUs with CUDA support to function at this time. |
| 70 | +* What is the minimum VRAM size requirement for the GPU if I want to install multiple apps? |
| 71 | + * When running multiple ExApps on the same GPU, the GPU must hold the largest model amongst the apps you install. |
| 72 | +* Is it possible to add more graphics cards for my instance to enable parallel requests or to speed up one request? |
| 73 | + * Parallel processing of AI workloads for the same app with multiple GPUs is currently not supported. |
| 74 | +* Can I use the CPU and GPU in parallel for AI processing? |
| 75 | + * No, you can only process AI workloads on either the CPU or GPU for one app. For different apps, you can decide whether to run them on CPU or GPU. |
0 commit comments