-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UV-5 - Enhance docs #6
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
af653f2
Enhance user creation and login docs
JeffMboya bd215f3
Add developer guide
JeffMboya 3a3f0f5
Add steps to build docker images
JeffMboya 3e8063b
Add HAL set-up
JeffMboya 3b85925
Remove duplicated steps
JeffMboya 4663bcb
Address comments
JeffMboya 5ce0895
Fix indentation
JeffMboya 5c40ef9
Fix indentation
JeffMboya e6de659
Clarify default Cube AI port
JeffMboya fd0ef3c
Clarify default Cube AI port
JeffMboya dad2e8d
Clarify default Cube AI port
JeffMboya 679958b
Fix grammar
JeffMboya ca9ecd4
Remove unnecessary instructions
JeffMboya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,79 @@ | ||
# Developer Guide | ||
|
||
This guide will help you get started with developing, deploying, and running Cube AI. | ||
|
||
## Cloning the Repository | ||
|
||
```bash | ||
git clone https://github.com/ultravioletrs/cube.git | ||
cd cube | ||
``` | ||
|
||
## Pulling Docker Images | ||
|
||
```bash | ||
cd cube/docker/ | ||
docker compose pull | ||
``` | ||
|
||
## Running Services with Docker Compose | ||
|
||
You can run/start Cube AI services using Docker Compose as described in [this guide](https://github.com/ultravioletrs/cube/blob/main/hal/ubuntu/README.md). | ||
|
||
To properly access Cube AI UI deployed on a different server, update the IP address entries in `docker/.env` as described in the above guide to point to your server IP address. The Cube AI UI can then be accessed through your browser at: | ||
|
||
```bash | ||
http://<your-server-ip-address>:3001 | ||
``` | ||
|
||
For example, if you have deployed locally, use: | ||
|
||
```bash | ||
http://localhost:3001 | ||
``` | ||
|
||
## Building Docker Images | ||
|
||
You can build the Docker images for Cube AI and related services using the `make` command in the project's root directory. | ||
|
||
To build the production Docker image, use: | ||
|
||
```bash | ||
make docker | ||
``` | ||
|
||
For the development Docker image, use: | ||
|
||
```bash | ||
make docker-dev | ||
``` | ||
|
||
## Hardware Abstraction Layer (HAL) for Confidential Computing | ||
|
||
For detailed instructions on setting up and building Cube HAL, please refer to [this guide](https://github.com/ultravioletrs/cube/blob/main/hal/buildroot/README.md). It covers: | ||
|
||
- Cloning the Buildroot and Cube repositories | ||
- Configuring and building Cube HAL | ||
- Running Cube HAL in a virtual machine | ||
|
||
## Cleaning up your Dockerized Cube AI Setup | ||
|
||
If you want to stop and remove the Cube AI services, volumes, and networks created during the setup, follow these steps: | ||
|
||
First, stop all running containers: | ||
|
||
```bash | ||
docker compose down | ||
``` | ||
|
||
Remove volumes and vetworks: | ||
|
||
```bash | ||
docker compose down --volumes --remove-orphans | ||
``` | ||
|
||
To clean up the build artifacts and remove compiled files, use: | ||
|
||
```bash | ||
make clean | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
# Getting Started | ||
|
||
Connect to Cube AI deployed instance on port `:6193`. Login with your username and password. If you can't log in ask the instance administrator to create a new user. | ||
Before logging in or interacting with Cube AI, you need to make sure that Cube AI has been deployed and is running. Deployment can be done by the instance administrator or by you if you have the necessary access permissions. Therefore, to Connect: | ||
|
||
1. Ensure that Cube AI is deployed and running on your instance. | ||
2. Connect to the deployed Cube AI instance on port `6193` using your login credentials (username and password). | ||
3. If you are unable to log in, contact the administrator of the instance and request that they create a new user account for you. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this, not needed for the doc |
||
|
||
## Create a new user | ||
|
||
Follow [this demonstration](https://jam.dev/c/f8d3fa47-7505-4201-b8ca-c0f724826237) to learn how to create a new user. Below are the summarized steps: | ||
If you are the instance administrator (or have administrator credentials), follow [this demonstration](https://jam.dev/c/f8d3fa47-7505-4201-b8ca-c0f724826237) to create a new user. Below are the summarized steps: | ||
|
||
1. Admin login with their credentials | ||
2. Create a new domain if there is none | ||
3. Login to the new domain or already existing domain | ||
1. Log in with admin credentials | ||
2. Create a new domain (if needed) | ||
3. Login to the newly created domain (or already existing domain) | ||
4. Click profile icon and navigate to `Manage Users` | ||
5. Click create | ||
6. Fill in the form | ||
7. Click `Create` | ||
8. Share the login credentials (username and password) with the new user | ||
|
||
## Login | ||
|
||
Get a token from using your login credentials. | ||
Once the administrator creates your account and shares your login details, use the credentials to log in to Cube AI and obtain an authentication token as shown below. | ||
|
||
```bash | ||
curl -ksSiX POST https://<cube-ai-instance>/users/tokens/issue -H "Content-Type: application/json" -d @- << EOF | ||
|
@@ -27,7 +32,7 @@ curl -ksSiX POST https://<cube-ai-instance>/users/tokens/issue -H "Content-Type: | |
EOF | ||
``` | ||
|
||
You'll receive a response similar to this: | ||
Be sure to replace `<your_email>` and `<your_password>` with your actual login details. You'll receive a response similar to this: | ||
|
||
```bash | ||
HTTP/2 201 | ||
|
@@ -40,7 +45,7 @@ content-length: 591 | |
{"access_token":"<access_token>","refresh_token":"<refresh_token>"} | ||
``` | ||
|
||
The `access_token` field in the response is your API token, which will be used for authentication in future API calls. | ||
The `access_token` field in the response is your API token, which will be used for authentication in future API calls. The `refresh_token` field is a token you can use to obtain a new access token once the current one expires. | ||
|
||
## VS Code Setup | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this port comes from? If this is Oolama specific, then mention this. If this is ours then explain that it is user-definable through ENV and that this is just a default.