Skip to content

Commit

Permalink
added contadt and website code
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankLeeeee committed Oct 9, 2023
1 parent 7e94f73 commit a4de0a9
Show file tree
Hide file tree
Showing 28 changed files with 30,022 additions and 79 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ jobs:
- name: Checkout The Docs Repo
uses: actions/checkout@v3

- name: Checkout Cloud Platform Source
uses: actions/checkout@v3
with:
repository: hpcaitech/Cloud-Platform-Docs-Website
token: ${{ secrets.CLOUD_PLATFORM_GITHUB_TOKEN }}
path: Cloud-Platform-Docs-Website

# Setup Node.js
- uses: actions/setup-node@v2
with:
Expand All @@ -42,7 +35,7 @@ jobs:
# Build for international release
- name: 🔨 Build
run: |
PLATFORM_HOSTNAME=platform.colossalai.com bash ./scripts/build.sh Cloud-Platform-Docs-Website
PLATFORM_HOSTNAME=platform.colossalai.com bash ./scripts/build.sh
mv Cloud-Platform-Docs-Website/cloud-platform-documentation/build ./
# Deploy to GitHub Pages for international release
Expand All @@ -65,13 +58,6 @@ jobs:
- name: Checkout The Docs Repo
uses: actions/checkout@v3

- name: Checkout Cloud Platform Source
uses: actions/checkout@v3
with:
repository: hpcaitech/Cloud-Platform-Docs-Website
token: ${{ secrets.CLOUD_PLATFORM_GITHUB_TOKEN }}
path: Cloud-Platform-Docs-Website

# Setup Node.js
- uses: actions/setup-node@v2
with:
Expand All @@ -87,7 +73,7 @@ jobs:
# Build for international release
- name: 🔨 Build
run: |
PLATFORM_HOSTNAME=platform.luchentech.com bash ./scripts/build.sh Cloud-Platform-Docs-Website
PLATFORM_HOSTNAME=platform.luchentech.com bash ./scripts/build.sh
mv ./Cloud-Platform-Docs-Website/cloud-platform-documentation/build ./
# scp to cloud server for China release
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
- name: 📚 Checkout
uses: actions/checkout@v2

- name: Checkout Cloud Platform Docs Website
uses: actions/checkout@v3
with:
repository: hpcaitech/Cloud-Platform-Docs-Website
token: ${{ secrets.CLOUD_PLATFORM_GITHUB_TOKEN }}
path: Cloud-Platform-Docs-Website

# Setup Node.js
- uses: actions/setup-node@v2
with:
Expand All @@ -31,4 +24,4 @@ jobs:
# Build
- name: 🔨 Build
run: |
bash ./scripts/build.sh Cloud-Platform-Docs-Website
bash ./scripts/build.sh
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ You will be able to preview the website at `http://localhost:3000/` by default.
In case you are modifying the frontend website source code and wanna preview the latest changes, you can run the following command to start the development server.

```bash
bash ./scripts/preview.sh <branch>
bash ./scripts/preview.sh
```

**Please note that the `<branch>` refers to the branch of the [Cloud-Platform-Docs-Website](https://github.com/hpcaitech/Cloud-Platform-Docs-Website) repository, not this repository.**
Expand All @@ -133,11 +133,11 @@ bash ./scripts/preview.sh <branch>
If you can preview your documentation locally, you can proceed to try to build your documentation. **Please note that preview does not guarantee that your documentation can be built successfully.**

```bash
bash ./scripts/build.sh <frontend-codebase-dir>
bash ./scripts/build.sh

# If you have run preview, your repository will be stored in .cache
# otherwise, you need to set your own path
bash ./scripts/build.sh .cache/Cloud-Platform-Docs-Website
bash ./scripts/build.sh
```

### 📦 Deployment
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/contact/hpc-ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Talk to a HPC-AI Tech expert

Talk to a HPC-AI Tech expert. Click the link: [https://www.hpc-ai.tech/contact](https://www.hpc-ai.tech/contact).
Binary file added docs/docs/contact/images/WeChat.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/docs/contact/slack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Join our Slack workspace

Join the Colossal-AI workspace on Slack to contact us. [Click here](https://join.slack.com/t/colossalaiworkspace/shared_invite/zt-2404o93sy-Y3~br1qkIeEcMOVSfJ8YYg).

Have joined? [Click here](https://colossalaiworkspace.slack.com/team/U02NCSGFD52).
3 changes: 3 additions & 0 deletions docs/docs/contact/wechat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add our WeChat account

![WeChat](./images/WeChat.jpeg)
21 changes: 10 additions & 11 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,24 @@ const sidebars = {
{
type: "category",
label: "训练任务",
items: [
"training/jobs",
"training/job_info",
],
items: ["training/jobs", "training/job_info"],
},
{
type: "category",
label: "推理API",
items: [
"inference/inference",
],
items: ["inference/inference"],
},
{
type: "category",
label: "命令行工具",
items: [
"cli/cli",
],
}
items: ["cli/cli"],
},
],
contactSidebar: [
`contact/${
process.env.PLATFORM_HOSTNAME?.includes("luchentech") ? "wechat" : "slack"
}`,
"contact/hpc-ai",
],
};

Expand Down
26 changes: 26 additions & 0 deletions docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*


#
docs/
blog/
sidebars.js
41 changes: 41 additions & 0 deletions docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](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 docusaurus/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')],
};
173 changes: 173 additions & 0 deletions docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "ColossalAI Platform Documentation",
tagline: "ColossalAI Platform Documentation",
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://docs.platform.colossalai.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "HPC-AI Technology Inc.", // Usually your GitHub org/user name.
projectName: "ColossalAI Platform", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

customFields: {
// Put your custom environment here
platformHostname: process.env.PLATFORM_HOSTNAME,
},

// Even if you don't use internalization, 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"],
},
plugins: [
function (context, options) {
return {
name: "postcss-tailwindcss-loader",
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(
require("postcss-import"),
require("tailwindcss"),
require("autoprefixer")
);
return postcssOptions;
},
};
},
],

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: "light",
disableSwitch: true,
respectPrefersColorScheme: false,
},
// Replace with your project's social card
image: "img/docusaurus-social-card.jpg",
navbar: {
title: "ColossalAI Platform",
logo: {
alt: "ColossalAI Platform",
src: "https://26563514.fs1.hubspotusercontent-eu1.net/hubfs/26563514/logos/colossal-ai_emblem.svg",
},
items: [
{
type: "docSidebar",
sidebarId: "contactSidebar",
position: "right",
label: "Contact Us",
},
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "right",
label: "Documentation",
},
{ to: "/blog", label: "Blog", position: "right" },
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Tutorial",
to: "/docs/intro",
},
{
label: "Blog",
to: "/blog",
},
],
},
{
title: "Company",
items: [
{
label: "About Us",
href: "https://www.hpc-ai.tech/",
},
{
label: "Customers",
href: "https://www.hpc-ai.tech/customers",
},
{
label: "Contact Us",
to: `/docs/contact/${
process.env.PLATFORM_HOSTNAME?.includes("luchentech")
? "wechat"
: "slack"
}`,
},
],
},
{
title: "Open-Source",
items: [
{
label: "Colossal-AI",
href: "https://colossalai.org/",
},
{
label: "ColossalAI Platform CLI",
href: "https://github.com/hpcaitech/ColossalAI-Platform-CLI",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} HPC-AI Technology, Inc.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};

module.exports = config;
Loading

0 comments on commit a4de0a9

Please sign in to comment.