Skip to content
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

Create public documentation using docusaurus #288

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: website

- name: Build website
run: yarn build
working-directory: website

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/build

deploy:
name: Deploy to GitHub Pages
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
id: api
---

# Cloud AI API
46 changes: 46 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
id: cli
---

# CLI

Cloud AI provides a command line interface (CLI) to interact with workloads.


## `cloudai run`
Runs a specified workload on a particular system. Might require [`cloudai install`](#cloudai-install) to be run first.

```bash
usage: cloudai run [-h] \
--system-config SYSTEM_CONFIG \
--tests-dir TESTS_DIR \
--test-scenario TEST_SCENARIO \
[--output-dir OUTPUT_DIR]
```

| Option | Required | Description |
|:-------|:---------|:------------|
| `--system-config` | yes | System TOML config |
| `--tests-dir` | yes | Path to Test TOML files, should be a valid directory |
| `--test-scenario` | yes | Test Scenario TOML config |
| `--output-dir` | no | Override default `output-dir` specified in System TOML config |


## `cloudai dry-run`
Same as [`cloudai run`](#cloudai-run), but does not actually run the workload. Useful for debugging and configuration validation.


## `cloudai install`
TBD


## `cloudai uninstall`
TBD


## `cloudai generate-reports`
TBD


## `cloudai verify-configs`
TBD
5 changes: 5 additions & 0 deletions docs/dev/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
id: dev
---

# Cloud AI Development
6 changes: 5 additions & 1 deletion doc/DEV.md → docs/dev/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Development
---
id: overview
---

# Overview
This document targets developers who want to contribute to the project's core.


Expand Down
17 changes: 17 additions & 0 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: quick-start
---

# Quick Start
CloudAI benchmark framework aims to develop an industry standard benchmark focused on grading Data Center (DC) scale AI systems in the Cloud. The primary motivation is to provide automated benchmarking on various systems.

```bash
# clone the repository
git clone https://github.com/NVIDIA/cloudai.git
cd cloudai

# create a virtual environment and install dependencies
python -m venv .venv
source .venv/bin/activate
pip install .
```
41 changes: 41 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
105 changes: 105 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Cloud AI',
tagline: 'Cloud AI is a framework for ...',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://nvidia.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/cloudai/',
trailingSlash: false,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'NVIDIA',
projectName: 'cloudai',

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

markdown: {
mermaid: true,
},
themes: ['@docusaurus/theme-mermaid'],

presets: [
[
'classic',
{
docs: {
path: '../docs',
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/NVIDIA/cloudai/edit/main/website/',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Cloud AI',
logo: {
alt: 'Cloud AI Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'doc',
docId: 'quick-start',
label: 'Docs',
position: 'left',
},
{
type: 'doc',
docId: 'dev/dev',
label: 'Dev',
position: 'left',
},
{
href: 'https://github.com/NVIDIA/cloudai',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Links',
items: [
{
label: 'GitHub',
href: 'https://github.com/NVIDIA/cloudai',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} NVIDIA, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
Loading