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

[Docs] Restructure doc page and add AI gallery #3331

Merged
merged 61 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
30c1d4b
WIP: AI gallery
concretevitamin Feb 25, 2024
28f8567
test
Michaelvll Mar 15, 2024
f634809
Docs
Michaelvll Mar 15, 2024
f135502
remove get started
Michaelvll Mar 15, 2024
abc7759
fix
Michaelvll Mar 15, 2024
288588c
fixes
Michaelvll Mar 16, 2024
9056f3f
move developer guide
Michaelvll Mar 16, 2024
8183c36
padding
Michaelvll Mar 16, 2024
3435eb4
Add Github
Michaelvll Mar 16, 2024
2dbbd32
Add processing for gallery
Michaelvll Mar 17, 2024
97e436c
add blog and slack to tab
Michaelvll Mar 18, 2024
468c3db
fix hyperlins
Michaelvll Mar 18, 2024
4b7c826
Add more gallery
Michaelvll Mar 18, 2024
58760db
add mistral 7B
Michaelvll Mar 19, 2024
a5cc3cf
Fix relative references
Michaelvll Mar 19, 2024
079f942
format
Michaelvll Mar 19, 2024
d42b1eb
fix lorax logo
Michaelvll Mar 19, 2024
e82d1a0
Basic readme for TGI
Michaelvll Mar 19, 2024
414a3d8
Add text for gallery
Michaelvll Mar 19, 2024
79bc120
bolding
Michaelvll Mar 19, 2024
3623aef
rename
Michaelvll Mar 19, 2024
dbea203
Use icon and ux fixes
Michaelvll Mar 20, 2024
15331fd
add redirect
Michaelvll Mar 20, 2024
b88dc65
format
Michaelvll Mar 20, 2024
e1b6e85
use blank page for home
Michaelvll Mar 20, 2024
ca321d7
change to welcome to skypilot
Michaelvll Mar 20, 2024
de6e046
rename gallery docs
Michaelvll Mar 20, 2024
4412295
Merge branch 'docs-with-gallery-2' of github.com:skypilot-org/skypilo…
Michaelvll Mar 20, 2024
6fcce9c
Fix cross reference
Michaelvll Mar 20, 2024
b3c94e7
Add a cover photo
Michaelvll Mar 20, 2024
f9b27bf
Add community
Michaelvll Mar 20, 2024
478c85e
use x for twitter
Michaelvll Mar 20, 2024
9b5ec92
change back to twitter
Michaelvll Mar 20, 2024
b8a652c
format
Michaelvll Mar 20, 2024
572e9cb
Fix company
Michaelvll Mar 20, 2024
6463191
remove unused file.
Michaelvll Mar 21, 2024
1b41069
Fix tab movement
Michaelvll Mar 21, 2024
f607717
Make plural
Michaelvll Mar 21, 2024
c4f352b
Merge branch 'master' of github.com:skypilot-org/skypilot into docs-w…
Michaelvll Mar 21, 2024
6ec9739
fix sidebar drawer
Michaelvll Mar 21, 2024
16ce19b
Address comments
Michaelvll Mar 21, 2024
0c45e64
remove unecessary file
Michaelvll Mar 21, 2024
b31331d
same underline
Michaelvll Mar 24, 2024
4550155
Update docs/source/_gallery_original/index.rst
Michaelvll Mar 25, 2024
e9f79bf
Update docs/source/_gallery_original/index.rst
Michaelvll Mar 25, 2024
6d8b386
Update docs/source/_gallery_original/index.rst
Michaelvll Mar 25, 2024
cf04d96
Update docs/source/_gallery_original/index.rst
Michaelvll Mar 25, 2024
2665a95
Update docs/source/_gallery_original/index.rst
Michaelvll Mar 25, 2024
5ae7fdb
remove remnant
Michaelvll Mar 25, 2024
f9cbf67
change cover photo
Michaelvll Mar 25, 2024
acb9ec7
Merge branch 'docs-with-gallery-2' of github.com:skypilot-org/skypilo…
Michaelvll Mar 25, 2024
c8290e1
address some comments
Michaelvll Mar 25, 2024
edb6d5d
address comments
Michaelvll Mar 25, 2024
efeb279
remove -X POST
Michaelvll Mar 25, 2024
4041b54
Merge branch 'master' of github.com:skypilot-org/skypilot into docs-w…
Michaelvll Mar 25, 2024
0483fb4
adopt changes from #3330
Michaelvll Mar 25, 2024
b16b40c
format
Michaelvll Mar 25, 2024
0bdc200
address comments
Michaelvll Mar 25, 2024
612995a
format
Michaelvll Mar 25, 2024
911270e
address comments
Michaelvll Mar 25, 2024
c8aa98b
Merge branch 'master' of github.com:skypilot-org/skypilot into docs-w…
Michaelvll Mar 25, 2024
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
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

1 change: 1 addition & 0 deletions docs/source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gallery/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this remnant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is to avoid generated gallery/ folder to be included in our git repo, as all the source files should be stay in _gallery_original

1 change: 1 addition & 0 deletions docs/source/_gallery_original/applications/localgpt.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/applications/tabby.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/frameworks/lorax.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/frameworks/sglang.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/frameworks/tgi.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/frameworks/vllm.md
67 changes: 67 additions & 0 deletions docs/source/_gallery_original/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
AI Gallery
====================


AI Gallery is a collection of ready-to-run recipes for popular AI frameworks and AI models.
It provides a simple way to **package**, **share**, and **run** AI projects using the simple interface of SkyPilot.

You can directly execute the SkyPilot YAMLs on your own infrastructure, such as :ref:`cloud VMs <installation>` or :ref:`Kubernetes <kubernetes-overview>`.

.. image:: ../images/ai-gallery-cover.png
:alt: AI Gallery
:align: center

Contents
--------

.. Relative paths are not supported in README.md. Instead, we should use GitHub
.. URLs for the references to the files.

.. toctree::
:maxdepth: 1
:caption: Inference Engines

vLLM <frameworks/vllm>
Hugging Face TGI <frameworks/tgi>
Michaelvll marked this conversation as resolved.
Show resolved Hide resolved
SGLang <frameworks/sglang>
LoRAX <frameworks/lorax>


.. toctree::
:maxdepth: 1
:caption: LLM Models

Mixtral (Mistral AI) <llms/mixtral>
Mistral 7B (Mistral AI) <https://docs.mistral.ai/self-deployment/skypilot/>
Llama-2 (Meta) <llms/llama-2>
CodeLlama (Meta) <llms/codellama>
Gemma (Google) <llms/gemma>

.. toctree::
:maxdepth: 1
:caption: Applications

Tabby: Coding Assistant <applications/tabby>
LocalGPT: Chat with PDF <applications/localgpt>

.. toctree::
:maxdepth: 1
:caption: Tutorials

tutorials/finetuning.md



Adding an Example to the Gallery
--------------------------------
We welcome contributions from the community. If you would like to contribute, please follow the guidelines below.

1. Fork the `SkyPilot repository <https://github.com/skypilot-org/skypilot>`__ on GitHub.
2. Create a new folder for your own framework, LLM model, or tutorial under `llm/ <https://github.com/skypilot-org/skypilot/tree/master/llm>`__.
3. Add a README.md, a SkyPilot YAML, and other necessary files to run the AI project.
4. Create a soft link in `docs/source/_gallery_original <https://github.com/skypilot-org/skypilot/blob/master/docs/source/_gallery_original>`__ to the README file in one of the subfolders (frameworks, llms, tutorials), e.g., :code:`cd docs/source/_gallery_original/llms; ln -s ../../llm/mixtral/README.md mixtral.md`.
5. Add the file path to the ``toctree`` above on this page.
6. Create a pull request to the `SkyPilot repository <https://github.com/skypilot-org/skypilot/compare>`__.

If you have any questions, please feel free to ask in the `SkyPilot Slack <https://slack.skypilot.co>`__.

1 change: 1 addition & 0 deletions docs/source/_gallery_original/llms/codellama.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/llms/gemma.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/llms/llama-2.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/llms/mixtral.md
1 change: 1 addition & 0 deletions docs/source/_gallery_original/tutorials/finetuning.md
4 changes: 2 additions & 2 deletions docs/source/_static/SkyPilot_wide_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 20 additions & 20 deletions docs/source/_static/SkyPilot_wide_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 65 additions & 1 deletion docs/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@


html[data-theme="light"] {
--pst-color-link: #176de8;
--pst-color-primary: #176de8;
--pst-color-secondary: var(--pst-color-primary);
--pst-color-text-base: #4c4c4d;
}

html[data-theme="dark"] {
--pst-color-link: #176de8;
--pst-color-primary: #176de8;
--pst-color-secondary: var(--pst-color-primary);

--pst-color-text-base: #d8d8d8;

.bd-sidebar::-webkit-scrollbar {
width: 6px;
background-color: #2e2e2e;
Expand Down Expand Up @@ -112,3 +118,61 @@ html[data-theme="dark"] {
vertical-align: middle;
line-height: 1; /* Adjust line height to ensure vertical alignment */
}

.navbar {
--bs-navbar-nav-link-padding-x: 1rem;
}

.navbar-brand.logo>svg {
width: 120px;
}

.navbar-brand.logo>svg .cls-6 {
fill: var(--pst-color-text-base);
}
/*********************************************
* Footer - content *
*********************************************/
.footer {
font-size: var(--sbt-font-size-small-1);

&.bd-footer-content {
display: flex;
flex-wrap: wrap;
padding: 15px;
border-top: 1px solid #ccc;
font-size: 85%;

.bd-footer-content__inner {
padding-left: 0px;

p {
margin-bottom: 0px;
}
}
}
}


.bd-header .navbar-nav li a.nav-link:hover {
text-decoration: none;
}

/* Add transparent underline for the other tabs that are not active to avoid
active tab to be moved up. */
.nav-link {
border-bottom: none;
}

.bd-header .navbar-nav>.current>.nav-link {
border-bottom: none;
}

/* Assuming your breakpoints are defined in pixels */
@media (min-width: 959.98px) {

.bd-sidebar-primary {
width: 20% !important;
}
}

11 changes: 10 additions & 1 deletion docs/source/_static/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
// New items:
const newItems = [
{ selector: '.caption-text', text: 'SkyServe: Model Serving' },
{ selector: '.toctree-l1 > a', text: 'Running on Kubernetes' }
{ selector: '.toctree-l1 > a', text: 'Running on Kubernetes' },
];
newItems.forEach(({ selector, text }) => {
document.querySelectorAll(selector).forEach((el) => {
Expand All @@ -36,3 +36,12 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
});

// Remove Previous button from every first page of each tab.
document.addEventListener("DOMContentLoaded", function () {
if (window.location.pathname.endsWith('/') || window.location.pathname.endsWith('index.html')) {
var style = document.createElement('style');
style.innerHTML = '.prev-next-area a.left-prev { display: none; }';
document.head.appendChild(style);
}
});
8 changes: 8 additions & 0 deletions docs/source/_static/rtd-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Dummy data for testing ReadTheDocs footer insertion
Michaelvll marked this conversation as resolved.
Show resolved Hide resolved
// This mimics RTD data for a project that uses both versions + languages
var READTHEDOCS_DATA = {
project: "frc-docs",
version: "latest",
language: "en",
proxied_api_host: "https://readthedocs.org",
};
5 changes: 5 additions & 0 deletions docs/source/_templates/author.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% if author %}
<p class="component-author">
By {{ author }}
</p>
{% endif %}
16 changes: 16 additions & 0 deletions docs/source/_templates/main-sidebar-home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #}
<nav class="bd-docs-nav bd-links" aria-label="{{ _('SkyPilot') }}">
<!-- <p class="bd-links__title" role="heading" aria-level="1">{{ _("SkyPilot") }}</p> -->
<div class="bd-toc-item navbar-nav">
{{- generate_toctree_html(
"sidebar",
startdepth=0,
show_nav_level=theme_show_nav_level | int,
maxdepth=theme_navigation_depth | int,
collapse=True,
includehidden=theme_sidebar_includehidden | tobool,
titles_only=True
)
-}}
</div>
</nav>
15 changes: 15 additions & 0 deletions docs/source/_templates/main-sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #}
<nav class="bd-docs-nav bd-links" aria-label="{{ _('SkyPilot') }}">
<!-- <p class="bd-links__title" role="heading" aria-level="1">{{ _("SkyPilot") }}</p> -->
<div class="bd-toc-item navbar-nav">
{{- generate_toctree_html(
"sidebar",
show_nav_level=theme_show_nav_level | int,
maxdepth=theme_navigation_depth | int,
collapse=theme_collapse_navigation | tobool,
includehidden=theme_sidebar_includehidden | tobool,
titles_only=True
)
-}}
</div>
</nav>
13 changes: 13 additions & 0 deletions docs/source/_templates/navbar-skypilot-logo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{# Logo link generation -#}
{% if not theme_logo.get("link") %}
{% set href = pathto(root_doc) %}
{% elif hasdoc(theme_logo.get("link")) %}
{% set href = pathto(theme_logo.get("link")) %} {# internal page #}
{% else %}
{% set href = theme_logo.get("link") %} {# external url #}
{% endif %}

{#- Logo HTML and image #}
<a class="navbar-brand logo" href="{{ href }}">
{{ theme_logo["svg"] }}
</a>
Loading
Loading