From dac487cb1354a554e71e4f7c63c67e51c6db0dbd Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 17 Feb 2025 16:31:17 +0100 Subject: [PATCH 1/7] feat(genapi): add tuto openwebui --- .../index.mdx | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 tutorials/deploy-openwebui-with-generative-apis/index.mdx diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx new file mode 100644 index 0000000000..ecd5d831c4 --- /dev/null +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -0,0 +1,137 @@ +--- +meta: + title: Deploying Open WebUI with Scaleway's Generative APIs + description: This guide explains how to deploy Open WebUI with Scaleway's Generative APIs using Docker or Scaleway's Serverless Containers. +content: + h1: Deploying Open WebUI with Scaleway's Generative APIs + paragraph: Learn how to integrate Scaleway's Generative APIs with Open WebUI for a seamless AI-powered experience using Docker or Scaleway's Serverless Containers. +tags: open-webui docker scaleway generative-apis +categories: + - generative-apis +dates: + validation: 2025-02-17 + posted: 2025-02-17 +--- + +Integrating Scaleway's Generative APIs with Open WebUI allows you to leverage powerful AI models in a user-friendly, self-hosted interface. +Open WebUI is an open-source frontend that simplifies interactions with AI models, providing an intuitive alternative to proprietary AI interfaces. + +This tutorial will guide you through: + +- Configuring Generative APIs on Scaleway +- Installing Open WebUI Locally +- Deploying Open WebUI Using Scaleway's Serverless Containers + + +By the end, you'll have a fully functional AI-powered setup. + + + +### Prerequisites + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Owner](/iam/concepts/#owner) status or appropriate [IAM permissions](/iam/concepts/#permission) +- [Docker](https://docs.docker.com/get-docker/) installed on your system + +## Configuring Generative APIs on Scaleway + +Scaleway's Generative APIs provide access to advanced AI models via simple API calls. To set up: + +### Creating an API key + +1. Log in to the [Scaleway Console](https://console.scaleway.com/). +2. Click on your **Organization name** in the top right corner of the console to display the menu. +3. Click **API keys** in the pop-up menu. +4. Click **Generate a New API Key**, provide a name, and store the key securely. + + + For detailed information about creating API keys, refer to [How to create API keys](/iam/how-to/create-api-keys/). + + +### Identifying the API endpoint + +Scaleway assigns a unique endpoint for your Generative API access. This can be found in the Generative APIs section of the console. The format typically follows: + +``` +https://api.scaleway.ai/YOUR_PROJECT_ID/v1 +``` + + + For more information about your Project ID, refer to our [dedicated documentation](/organizations-and-projects/how-to/create-a-project/). + + +## Installing Open WebUI locally + +Open WebUI provides an easy-to-use interface for interacting with AI models. The recommended installation method is via Docker. + +### Running Open WebUI with Scaleway integration + +1. Pull and Run the Docker container: + + ```bash + docker run -d \ + -p 3000:8080 \ + -e OPENAI_API_BASE_URL=https://api.scaleway.ai//v1 \ + -e OPENAI_API_KEY= \ + -v open-webui:/app/backend/data \ + --name open-webui \ + --restart always \ + ghcr.io/open-webui/open-webui:main + ``` + + + Replace `` and `` with your actual values. + + +2. Navigate to `http://localhost:3000` in your browser to access the Open WebUI interface. + +3. Click **Sign Up** to create an administrator account. +4. Select a Model from the available Scaleway AI models and start interacting. + +For more details, refer to the [Open WebUI Quick Start Guide](https://docs.openwebui.com/getting-started/quick-start/). + +## Deploying Open WebUI Using Scaleway's Serverless Containers (Optional) + +For cloud-based deployment, Scaleway's Serverless Containers offer a scalable solution. + +### Deploying on Scaleway via the console + +1. In the Scaleway Console, navigate to **Serverless** > **Containers**. +2. Click **Deploy Container** to display the container creation wizard. +3. Select an external registry and use the image `ghcr.io/open-webui/open-webui:main`. +4. Enter a name for your container and configure it's resources. +5. Click **Advanced options** and configure Secrets: + - Set `OPENAI_API_BASE_URL` and `OPENAI_API_KEY` with your specific values. + +6. Click **Deploy container** to launch deployment. Once deployed, note the provided endpoint to access Open WebUI. + +### Deploying on Scaleway using the ClI + +#### Ensure your Scaleway namespace exists + +Scaleway Serverless Containers are deployed inside a **namespace**. If you do not have one, create it first: + +```bash +scw container namespace create name=openwebui-ns region=fr-par +``` +Find the namespace ID: +```bash +scw container namespace list +``` + +### Create the Serverless Container +Now, create the container with your **Docker image and secret injection**: + +```bash + +$ scw container container create name=open-webui \ + namespace-id= \ + registry-image="ghcr.io/open-webui/open-webui:main" \ + environment-variables.OPENAI_API_BASE_URL="https://api.scaleway.ai//v1" \ + secret-environment-variables.0.key="OPENAI_API_KEY" \ + secret-environment-variables.0.value="" \ + region=fr-par +``` + +For more details, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/). + From c74e8824de0ea18b1142d618225c8722bd905aa0 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Mon, 17 Feb 2025 16:40:36 +0100 Subject: [PATCH 2/7] feat(genapi): tuto --- tutorials/deploy-openwebui-with-generative-apis/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index ecd5d831c4..40a8bc7f62 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -53,7 +53,7 @@ Scaleway's Generative APIs provide access to advanced AI models via simple API c Scaleway assigns a unique endpoint for your Generative API access. This can be found in the Generative APIs section of the console. The format typically follows: ``` -https://api.scaleway.ai/YOUR_PROJECT_ID/v1 +https://api.scaleway.ai//v1 ``` From 6e673c0e37ff34036e2fadfb77133eb39644db6c Mon Sep 17 00:00:00 2001 From: fpagny Date: Mon, 17 Feb 2025 18:12:28 +0100 Subject: [PATCH 3/7] Update index.mdx --- .../index.mdx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index 40a8bc7f62..da74bc9935 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -56,6 +56,9 @@ Scaleway assigns a unique endpoint for your Generative API access. This can be f https://api.scaleway.ai//v1 ``` +If you have not created a dedicated project and are using the `default` project created with your Scaleway Account, you can use directly the following url: `https://api.scaleway.ai/v1`. +You can also find the exact URL snippet including your `project_id` by visiting [Generative API Playground](https://console.scaleway.com/generative-api/models/fr-par/playground) and clicking on `View Code`. + For more information about your Project ID, refer to our [dedicated documentation](/organizations-and-projects/how-to/create-a-project/). @@ -69,8 +72,7 @@ Open WebUI provides an easy-to-use interface for interacting with AI models. The 1. Pull and Run the Docker container: ```bash - docker run -d \ - -p 3000:8080 \ + docker run -p 3000:8080 \ -e OPENAI_API_BASE_URL=https://api.scaleway.ai//v1 \ -e OPENAI_API_KEY= \ -v open-webui:/app/backend/data \ @@ -99,12 +101,19 @@ For cloud-based deployment, Scaleway's Serverless Containers offer a scalable so 1. In the Scaleway Console, navigate to **Serverless** > **Containers**. 2. Click **Deploy Container** to display the container creation wizard. 3. Select an external registry and use the image `ghcr.io/open-webui/open-webui:main`. + + You do not need to configure the port as the default one - `8080` - is the one used by the image from `ghcr.io/open-webui/open-webui:main`. + 4. Enter a name for your container and configure it's resources. 5. Click **Advanced options** and configure Secrets: - Set `OPENAI_API_BASE_URL` and `OPENAI_API_KEY` with your specific values. 6. Click **Deploy container** to launch deployment. Once deployed, note the provided endpoint to access Open WebUI. + + Since Open WebUI default image is around 5GB size, deployment can take a couple of minutes before being ready. + + ### Deploying on Scaleway using the ClI #### Ensure your Scaleway namespace exists @@ -133,5 +142,8 @@ $ scw container container create name=open-webui \ region=fr-par ``` -For more details, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/). + + Replace `` and `` with your actual values. + +For more details, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/). From 7a1626988cec48bde078f7cdd4563e8a60fdce01 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Tue, 18 Feb 2025 15:24:55 +0100 Subject: [PATCH 4/7] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Néda <87707325+nerda-codes@users.noreply.github.com> Co-authored-by: Rowena Jones <36301604+RoRoJ@users.noreply.github.com> --- .../index.mdx | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index da74bc9935..88a2e852be 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -19,8 +19,8 @@ Open WebUI is an open-source frontend that simplifies interactions with AI model This tutorial will guide you through: - Configuring Generative APIs on Scaleway -- Installing Open WebUI Locally -- Deploying Open WebUI Using Scaleway's Serverless Containers +- Installing Open WebUI locally +- Deploying Open WebUI using Scaleway's Serverless Containers By the end, you'll have a fully functional AI-powered setup. @@ -35,17 +35,17 @@ By the end, you'll have a fully functional AI-powered setup. ## Configuring Generative APIs on Scaleway -Scaleway's Generative APIs provide access to advanced AI models via simple API calls. To set up: +Scaleway's Generative APIs provide access to advanced AI models via simple API calls. Follow the instructions below to set up Generative APIs ### Creating an API key -1. Log in to the [Scaleway Console](https://console.scaleway.com/). +1. Log in to the [Scaleway console](https://console.scaleway.com/). 2. Click on your **Organization name** in the top right corner of the console to display the menu. 3. Click **API keys** in the pop-up menu. 4. Click **Generate a New API Key**, provide a name, and store the key securely. - For detailed information about creating API keys, refer to [How to create API keys](/iam/how-to/create-api-keys/). + For detailed information about creating API keys, refer to the [how to create API keys documentation](/iam/how-to/create-api-keys/). ### Identifying the API endpoint @@ -56,11 +56,11 @@ Scaleway assigns a unique endpoint for your Generative API access. This can be f https://api.scaleway.ai//v1 ``` -If you have not created a dedicated project and are using the `default` project created with your Scaleway Account, you can use directly the following url: `https://api.scaleway.ai/v1`. -You can also find the exact URL snippet including your `project_id` by visiting [Generative API Playground](https://console.scaleway.com/generative-api/models/fr-par/playground) and clicking on `View Code`. +If you have not created a dedicated Project and are using the `default` Project created with your Scaleway account, you can use the following url: `https://api.scaleway.ai/v1`. +You can also find the exact URL snippet including your `project_id` by visiting the [Generative API Playground](https://console.scaleway.com/generative-api/models/fr-par/playground) and clicking **View Code**. - For more information about your Project ID, refer to our [dedicated documentation](/organizations-and-projects/how-to/create-a-project/). + Refer to our [dedicated documentation](/organizations-and-projects/how-to/create-a-project/) to retrieve your Project ID. ## Installing Open WebUI locally @@ -69,7 +69,7 @@ Open WebUI provides an easy-to-use interface for interacting with AI models. The ### Running Open WebUI with Scaleway integration -1. Pull and Run the Docker container: +1. Pull and run the Docker container: ```bash docker run -p 3000:8080 \ @@ -88,48 +88,49 @@ Open WebUI provides an easy-to-use interface for interacting with AI models. The 2. Navigate to `http://localhost:3000` in your browser to access the Open WebUI interface. 3. Click **Sign Up** to create an administrator account. -4. Select a Model from the available Scaleway AI models and start interacting. +4. Select a model from the available Scaleway AI models and start interacting. For more details, refer to the [Open WebUI Quick Start Guide](https://docs.openwebui.com/getting-started/quick-start/). -## Deploying Open WebUI Using Scaleway's Serverless Containers (Optional) +## Deploying Open WebUI using Scaleway's Serverless Containers (Optional) For cloud-based deployment, Scaleway's Serverless Containers offer a scalable solution. ### Deploying on Scaleway via the console -1. In the Scaleway Console, navigate to **Serverless** > **Containers**. +1. In the Scaleway console, navigate to **Serverless** > **Containers**. 2. Click **Deploy Container** to display the container creation wizard. -3. Select an external registry and use the image `ghcr.io/open-webui/open-webui:main`. +3. Select an external registry and use the `ghcr.io/open-webui/open-webui:main` image. - You do not need to configure the port as the default one - `8080` - is the one used by the image from `ghcr.io/open-webui/open-webui:main`. + You do not need to configure the port as the default one as `8080` is the one used by the image from `ghcr.io/open-webui/open-webui:main`. -4. Enter a name for your container and configure it's resources. -5. Click **Advanced options** and configure Secrets: +4. Enter a name for your container and configure its resources. +5. Click **Advanced options** and configure secrets: - Set `OPENAI_API_BASE_URL` and `OPENAI_API_KEY` with your specific values. 6. Click **Deploy container** to launch deployment. Once deployed, note the provided endpoint to access Open WebUI. - Since Open WebUI default image is around 5GB size, deployment can take a couple of minutes before being ready. + Since the Open WebUI default image is around 5GB size, deployment can take a couple of minutes before being ready. ### Deploying on Scaleway using the ClI -#### Ensure your Scaleway namespace exists +#### Ensure you have a Scaleway Serverless Containers namespace -Scaleway Serverless Containers are deployed inside a **namespace**. If you do not have one, create it first: +Scaleway Serverless Containers are deployed inside a **namespace**. Run the following command to create a namespace: ```bash scw container namespace create name=openwebui-ns region=fr-par ``` -Find the namespace ID: +Run the following command to retrieve the namespace ID: ```bash scw container namespace list ``` ### Create the Serverless Container -Now, create the container with your **Docker image and secret injection**: + +Run the following command to create the container with your **Docker image and secret injection**: ```bash @@ -146,4 +147,4 @@ $ scw container container create name=open-webui \ Replace `` and `` with your actual values. -For more details, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/). +For more information, refer to Scaleway's [Serverless Containers documentation](/serverless-containers/). From 16fed023d244cbb07187eb190e41345d55908320 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 20 Feb 2025 13:49:07 +0100 Subject: [PATCH 5/7] Apply suggestions from code review --- tutorials/deploy-openwebui-with-generative-apis/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index 88a2e852be..c16a3202af 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -102,7 +102,7 @@ For cloud-based deployment, Scaleway's Serverless Containers offer a scalable so 2. Click **Deploy Container** to display the container creation wizard. 3. Select an external registry and use the `ghcr.io/open-webui/open-webui:main` image. - You do not need to configure the port as the default one as `8080` is the one used by the image from `ghcr.io/open-webui/open-webui:main`. + The default port `8080` is used by the `ghcr.io/open-webui/open-webui:main` image, so no further configuration is needed. 4. Enter a name for your container and configure its resources. 5. Click **Advanced options** and configure secrets: From c03aeda839672b6679cb8219e77998b9067ba25a Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Thu, 20 Feb 2025 17:36:23 +0100 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Jessica <113192637+jcirinosclwy@users.noreply.github.com> --- tutorials/deploy-openwebui-with-generative-apis/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index c16a3202af..d7d9be4ebd 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -56,7 +56,7 @@ Scaleway assigns a unique endpoint for your Generative API access. This can be f https://api.scaleway.ai//v1 ``` -If you have not created a dedicated Project and are using the `default` Project created with your Scaleway account, you can use the following url: `https://api.scaleway.ai/v1`. +If you have not created a dedicated Project and are using the `default` Project created with your Scaleway account, you can use the following URL: `https://api.scaleway.ai/v1`. You can also find the exact URL snippet including your `project_id` by visiting the [Generative API Playground](https://console.scaleway.com/generative-api/models/fr-par/playground) and clicking **View Code**. @@ -111,7 +111,7 @@ For cloud-based deployment, Scaleway's Serverless Containers offer a scalable so 6. Click **Deploy container** to launch deployment. Once deployed, note the provided endpoint to access Open WebUI. - Since the Open WebUI default image is around 5GB size, deployment can take a couple of minutes before being ready. + Since the Open WebUI default image is around 5 GB size, deployment can take a couple of minutes before being ready. ### Deploying on Scaleway using the ClI From 8b0630cc9869e507c25624d9f01bf09cedc94114 Mon Sep 17 00:00:00 2001 From: Benedikt Rollik Date: Fri, 21 Feb 2025 09:49:12 +0100 Subject: [PATCH 7/7] Apply suggestions from code review --- tutorials/deploy-openwebui-with-generative-apis/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/deploy-openwebui-with-generative-apis/index.mdx b/tutorials/deploy-openwebui-with-generative-apis/index.mdx index d7d9be4ebd..090802b2d9 100644 --- a/tutorials/deploy-openwebui-with-generative-apis/index.mdx +++ b/tutorials/deploy-openwebui-with-generative-apis/index.mdx @@ -23,7 +23,7 @@ This tutorial will guide you through: - Deploying Open WebUI using Scaleway's Serverless Containers -By the end, you'll have a fully functional AI-powered setup. +By the end, you will have a fully functional AI-powered setup.