diff --git a/.readthedocs.yml b/.readthedocs.yml index a5387af03ea..eb1f8a0a950 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,9 +6,9 @@ version: 2 build: - os: "ubuntu-20.04" + os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.10" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index a4436ba0391..161f0eecd54 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,16 +1,18 @@ -sphinx==4.3.2 +sphinx==7.1.2 sphinx-click==5.0.1 -sphinx-copybutton==0.5.0 -sphinx-design==0.4.1 -pydata-sphinx-theme==0.7.2 -sphinx-autodoc-typehints==1.17.0 -sphinx-book-theme==0.2.0 -sphinx-togglebutton==0.3.0 -sphinxcontrib-applehelp==1.0.2 -sphinxcontrib-devhelp==1.0.2 -sphinxcontrib-htmlhelp==2.0.0 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.3 -sphinxcontrib-serializinghtml==1.1.5 +sphinx-copybutton==0.5.2 sphinxemoji==0.2.0 -myst-parser==0.18.1 +sphinx-design==0.5.0 +pydata-sphinx-theme==0.14.4 +Pygments==2.16.1 +myst-parser==2.0.0 + +sphinx-autodoc-typehints==1.25.2 +sphinx-book-theme==1.1.0 +sphinx-togglebutton==0.3.2 +sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-serializinghtml==1.1.9 diff --git a/docs/source/_static/SkyPilot_wide_dark.svg b/docs/source/_static/SkyPilot_wide_dark.svg new file mode 100644 index 00000000000..310845379d8 --- /dev/null +++ b/docs/source/_static/SkyPilot_wide_dark.svg @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2548.69 702.54"> + <defs> + <style> + .cls-1 { + fill: none; + } + + .cls-2 { + fill: #d8d8d8; + } + + .cls-3, .cls-4 { + fill: #372f8a; + } + + .cls-5 { + fill: #195d7f; + } + + .cls-6 { + fill: #39a4dd; + } + + .cls-4 { + filter: url(#drop-shadow-1); + } + </style> + <filter id="drop-shadow-1" filterUnits="userSpaceOnUse"> + <feOffset dx="7" dy="7"/> + <feGaussianBlur result="blur" stdDeviation="5"/> + <feFlood flood-color="#333" flood-opacity=".6"/> + <feComposite in2="blur" operator="in"/> + <feComposite in="SourceGraphic"/> + </filter> + </defs> + <g id="skypilot_text" data-name="skypilot text"> + <g> + <path class="cls-2" d="M875.31,433.01c0-13.39-4.73-23.67-14.18-30.84-9.45-7.17-26.47-14.73-51.05-22.69-24.58-7.95-44.04-15.79-58.37-23.51-39.08-21.11-58.61-49.55-58.61-85.31,0-18.59,5.24-35.17,15.72-49.75,10.48-14.57,25.52-25.96,45.14-34.15,19.62-8.19,41.63-12.29,66.05-12.29s46.48,4.45,65.7,13.35c19.22,8.9,34.15,21.47,44.78,37.69,10.63,16.23,15.95,34.66,15.95,55.3h-70.9c0-15.75-4.96-28-14.89-36.75s-23.87-13.12-41.83-13.12-30.8,3.66-40.41,10.99c-9.61,7.33-14.42,16.98-14.42,28.95,0,11.19,5.63,20.56,16.9,28.12,11.26,7.56,27.85,14.65,49.75,21.27,40.33,12.13,69.72,27.18,88.15,45.14s27.65,40.33,27.65,67.12c0,29.78-11.27,53.14-33.79,70.07-22.53,16.94-52.86,25.41-90.99,25.41-26.47,0-50.57-4.84-72.32-14.53s-38.33-22.96-49.75-39.82c-11.42-16.86-17.13-36.39-17.13-58.61h71.13c0,37.97,22.69,56.96,68.06,56.96,16.86,0,30.01-3.43,39.47-10.28s14.18-16.42,14.18-28.71Z"/> + <path class="cls-2" d="M1070.71,420.72l-24.58,24.58v77.99h-68.3V160.29h68.3v201.12l13.23-17.02,65.46-76.81h82.01l-92.4,106.58,100.44,149.12h-78.46l-65.7-102.57Z"/> + <path class="cls-2" d="M1319.75,426.63l47.27-159.05h73.26l-102.8,295.41-5.67,13.47c-15.28,33.4-40.49,50.1-75.62,50.1-9.93,0-20.01-1.5-30.25-4.49v-51.76l10.4,.24c12.92,0,22.57-1.97,28.95-5.91,6.38-3.94,11.38-10.48,15.01-19.62l8.04-21.03-89.57-256.42h73.5l47.5,159.05Z"/> + <path class="cls-2" d="M1530.5,402.05v121.24h-70.9V179.19h134.23c25.84,0,48.57,4.73,68.18,14.18s34.7,22.89,45.26,40.29c10.55,17.41,15.83,37.22,15.83,59.44,0,33.72-11.54,60.3-34.62,79.76-23.08,19.46-55.03,29.19-95.83,29.19h-62.15Zm0-57.43h63.34c18.75,0,33.04-4.41,42.89-13.23,9.84-8.82,14.77-21.42,14.77-37.81s-4.96-30.49-14.89-40.88-23.63-15.75-41.12-16.07h-64.99v108Z"/> + <path class="cls-2" d="M1754.73,201.41c0-10.24,3.43-18.67,10.28-25.29s16.19-9.93,28-9.93,20.95,3.31,27.89,9.93c6.93,6.62,10.4,15.05,10.4,25.29s-3.51,18.91-10.52,25.52c-7.01,6.62-16.27,9.93-27.77,9.93s-20.76-3.31-27.77-9.93c-7.01-6.62-10.52-15.12-10.52-25.52Zm72.55,321.88h-68.54v-255.71h68.54v255.71Z"/> + <path class="cls-2" d="M1943.51,523.29h-68.54V160.29h68.54v363Z"/> + <path class="cls-2" d="M1977.02,393.07c0-25.36,4.88-47.97,14.65-67.83,9.77-19.85,23.83-35.21,42.18-46.08,18.35-10.87,39.66-16.31,63.93-16.31,34.5,0,62.66,10.56,84.49,31.67,21.82,21.11,33.99,49.79,36.51,86.02l.47,17.49c0,39.23-10.95,70.7-32.85,94.41-21.9,23.71-51.28,35.57-88.15,35.57s-66.29-11.82-88.27-35.45-32.97-55.77-32.97-96.42v-3.07Zm68.3,4.85c0,24.3,4.57,42.88,13.71,55.74,9.14,12.86,22.21,19.29,39.23,19.29s29.46-6.35,38.76-19.05c9.29-12.7,13.94-33.02,13.94-60.95,0-23.82-4.65-42.29-13.94-55.39-9.3-13.09-22.37-19.64-39.23-19.64s-29.62,6.51-38.76,19.53c-9.14,13.02-13.71,33.18-13.71,60.47Z"/> + <path class="cls-2" d="M2331,204.72v62.86h43.72v50.1h-43.72v127.62c0,9.45,1.81,16.23,5.44,20.32,3.62,4.1,10.55,6.14,20.8,6.14,7.56,0,14.26-.55,20.09-1.65v51.76c-13.39,4.1-27.18,6.14-41.36,6.14-47.9,0-72.32-24.18-73.26-72.55v-137.78h-37.34v-50.1h37.34v-62.86h68.3Z"/> + </g> + </g> + <g id="abstract_paperplane" data-name="abstract paperplane"> + <line class="cls-1" x1="108.58" y1="256.63" x2="544.81" y2="132.87"/> + <line class="cls-1" x1="199.67" y1="275.66" x2="186.64" y2="234.45"/> + <line class="cls-1" x1="249.36" y1="392.02" x2="287.29" y2="429.95"/> + <line class="cls-1" x1="481" y1="196.47" x2="467.97" y2="155.26"/> + <g> + <polygon class="cls-3" points="338.91 423.79 283.78 431.82 421.07 569.12 398.99 483.86 338.91 423.79"/> + <path class="cls-3" d="M544.81,132.87L108.58,256.63l137.28,137.27,12.9-59.15-59.08-59.08,281.33-79.19s55.86-55.55,63.81-63.6Z"/> + <path class="cls-4" d="M481,196.47l-82.01,287.39,22.08,85.25,123.75-436.25c-7.95,8.05-63.81,63.6-63.81,63.6Z"/> + </g> + <g> + <polygon class="cls-5" points="303.14 374.54 303.14 374.54 283.78 431.82 338.91 423.79 388.44 289.53 388 289.68 303.14 374.54"/> + <polygon class="cls-6" points="258.75 334.74 245.85 393.9 303.14 374.54 388 289.68 258.75 334.74"/> + </g> + </g> +</svg> \ No newline at end of file diff --git a/docs/source/_static/SkyPilot_wide_light.svg b/docs/source/_static/SkyPilot_wide_light.svg new file mode 100644 index 00000000000..a85852f6028 --- /dev/null +++ b/docs/source/_static/SkyPilot_wide_light.svg @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2345.46 581.76"> + <defs> + <style> + .cls-1 { + fill: none; + } + + .cls-2, .cls-3 { + fill: #372f8a; + } + + .cls-4 { + fill: #195d7f; + } + + .cls-5 { + fill: #39a4dd; + } + + .cls-6 { + fill: #4c4c4d; + } + + .cls-3 { + filter: url(#drop-shadow-1); + } + </style> + <filter id="drop-shadow-1" filterUnits="userSpaceOnUse"> + <feOffset dx="7" dy="7"/> + <feGaussianBlur result="blur" stdDeviation="5"/> + <feFlood flood-color="#333" flood-opacity=".6"/> + <feComposite in2="blur" operator="in"/> + <feComposite in="SourceGraphic"/> + </filter> + </defs> + <g id="skypilot_text" data-name="skypilot text"> + <g> + <path class="cls-6" d="M766.73,360.32c0-13.39-4.73-23.67-14.18-30.84-9.45-7.17-26.47-14.73-51.05-22.69-24.58-7.95-44.04-15.79-58.37-23.51-39.08-21.11-58.61-49.55-58.61-85.31,0-18.59,5.24-35.17,15.72-49.75,10.48-14.57,25.52-25.96,45.14-34.15,19.62-8.19,41.63-12.29,66.05-12.29s46.48,4.45,65.7,13.35c19.22,8.9,34.15,21.47,44.78,37.69,10.63,16.23,15.95,34.66,15.95,55.3h-70.9c0-15.75-4.96-28-14.89-36.75s-23.87-13.12-41.83-13.12-30.8,3.66-40.41,10.99c-9.61,7.33-14.42,16.98-14.42,28.95,0,11.19,5.63,20.56,16.9,28.12,11.26,7.56,27.85,14.65,49.75,21.27,40.33,12.13,69.72,27.18,88.15,45.14s27.65,40.33,27.65,67.12c0,29.78-11.27,53.14-33.79,70.07-22.53,16.94-52.86,25.41-90.99,25.41-26.47,0-50.57-4.84-72.32-14.53s-38.33-22.96-49.75-39.82c-11.42-16.86-17.13-36.39-17.13-58.61h71.13c0,37.97,22.69,56.96,68.06,56.96,16.86,0,30.01-3.43,39.47-10.28s14.18-16.42,14.18-28.71Z"/> + <path class="cls-6" d="M962.13,348.03l-24.58,24.58v77.99h-68.3V87.6h68.3v201.12l13.23-17.02,65.46-76.81h82.01l-92.4,106.58,100.44,149.12h-78.46l-65.7-102.57Z"/> + <path class="cls-6" d="M1211.17,353.94l47.27-159.05h73.26l-102.8,295.41-5.67,13.47c-15.28,33.4-40.49,50.1-75.62,50.1-9.93,0-20.01-1.5-30.25-4.49v-51.76l10.4,.24c12.92,0,22.57-1.97,28.95-5.91,6.38-3.94,11.38-10.48,15.01-19.62l8.04-21.03-89.57-256.42h73.5l47.5,159.05Z"/> + <path class="cls-6" d="M1421.93,329.36v121.24h-70.9V106.5h134.23c25.84,0,48.57,4.73,68.18,14.18s34.7,22.89,45.26,40.29c10.55,17.41,15.83,37.22,15.83,59.44,0,33.72-11.54,60.3-34.62,79.76-23.08,19.46-55.03,29.19-95.83,29.19h-62.15Zm0-57.43h63.34c18.75,0,33.04-4.41,42.89-13.23,9.84-8.82,14.77-21.42,14.77-37.81s-4.96-30.49-14.89-40.88-23.63-15.75-41.12-16.07h-64.99v108Z"/> + <path class="cls-6" d="M1646.16,128.72c0-10.24,3.43-18.67,10.28-25.29s16.19-9.93,28-9.93,20.95,3.31,27.89,9.93c6.93,6.62,10.4,15.05,10.4,25.29s-3.51,18.91-10.52,25.52c-7.01,6.62-16.27,9.93-27.77,9.93s-20.76-3.31-27.77-9.93c-7.01-6.62-10.52-15.12-10.52-25.52Zm72.55,321.88h-68.54V194.89h68.54v255.71Z"/> + <path class="cls-6" d="M1834.93,450.6h-68.54V87.6h68.54V450.6Z"/> + <path class="cls-6" d="M1868.45,320.38c0-25.36,4.88-47.97,14.65-67.83,9.77-19.85,23.83-35.21,42.18-46.08,18.35-10.87,39.66-16.31,63.93-16.31,34.5,0,62.66,10.56,84.49,31.67,21.82,21.11,33.99,49.79,36.51,86.02l.47,17.49c0,39.23-10.95,70.7-32.85,94.41-21.9,23.71-51.28,35.57-88.15,35.57s-66.29-11.82-88.27-35.45-32.97-55.77-32.97-96.42v-3.07Zm68.3,4.85c0,24.3,4.57,42.88,13.71,55.74,9.14,12.86,22.21,19.29,39.23,19.29s29.46-6.35,38.76-19.05c9.29-12.7,13.94-33.02,13.94-60.95,0-23.82-4.65-42.29-13.94-55.39-9.3-13.09-22.37-19.64-39.23-19.64s-29.62,6.51-38.76,19.53c-9.14,13.02-13.71,33.18-13.71,60.47Z"/> + <path class="cls-6" d="M2222.42,132.03v62.86h43.72v50.1h-43.72v127.62c0,9.45,1.81,16.23,5.44,20.32,3.62,4.1,10.55,6.14,20.8,6.14,7.56,0,14.26-.55,20.09-1.65v51.76c-13.39,4.1-27.18,6.14-41.36,6.14-47.9,0-72.32-24.18-73.26-72.55V244.99h-37.34v-50.1h37.34v-62.86h68.3Z"/> + </g> + </g> + <g id="abstract_paperplane" data-name="abstract paperplane"> + <line class="cls-1" x1="0" y1="183.94" x2="436.24" y2="60.18"/> + <line class="cls-1" x1="91.09" y1="202.97" x2="78.06" y2="161.76"/> + <line class="cls-1" x1="140.79" y1="319.34" x2="178.71" y2="357.26"/> + <line class="cls-1" x1="372.42" y1="123.78" x2="359.39" y2="82.57"/> + <g> + <polygon class="cls-2" points="230.33 351.1 175.2 359.14 312.49 496.43 290.41 411.18 230.33 351.1"/> + <path class="cls-2" d="M436.24,60.18L0,183.94l137.28,137.27,12.9-59.15-59.08-59.08L372.42,123.78s55.86-55.55,63.81-63.6Z"/> + <path class="cls-3" d="M372.42,123.78l-82.01,287.39,22.08,85.25L436.24,60.18c-7.95,8.05-63.81,63.6-63.81,63.6Z"/> + </g> + <g> + <polygon class="cls-4" points="194.56 301.85 194.56 301.85 175.2 359.14 230.33 351.1 279.86 216.84 279.42 216.99 194.56 301.85"/> + <polygon class="cls-5" points="150.18 262.05 137.28 321.21 194.56 301.85 279.42 216.99 150.18 262.05"/> + </g> + </g> +</svg> \ No newline at end of file diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 8837420a524..35a1ce3eb21 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -19,4 +19,78 @@ /* RTD Flyout */ .rst-versions { z-index: 10001 !important; /* Set to 10001 to avoid overlap with kapa */ -} \ No newline at end of file +} + + +html[data-theme="light"] { + --pst-color-secondary: var(--pst-color-primary); +} + +html[data-theme="dark"] { + --pst-color-secondary: var(--pst-color-primary); + + .bd-sidebar::-webkit-scrollbar { + width: 6px; + background-color: #2e2e2e; + } + + .bd-sidebar::-webkit-scrollbar-thumb { + background-color: #565656; + border-radius: 6px; + } + + .bd-sidebar::-webkit-scrollbar-thumb:hover { + background-color: #6f6f6f; + } + + /* Common hidden scrollbar when not hovered */ + .bd-sidebar:not(:hover) { + -ms-overflow-style: none; + } + + .bd-sidebar:not(:hover)::-webkit-scrollbar { + background: var(--pst-color-background); + } + + .bd-sidebar:not(:hover)::-webkit-scrollbar-thumb { + background: var(--pst-color-background); + } +} + +/* Light mode scrollbar styles */ +.bd-sidebar::-webkit-scrollbar { + width: 6px; + background-color: #f0f0f0; +} + +.bd-sidebar::-webkit-scrollbar-thumb { + background-color: #c1c1c1; + /* rounded corners */ + border-radius: 6px; +} + +.bd-sidebar::-webkit-scrollbar-thumb:hover { + background-color: #a8a8a8; +} + +/* Common hidden scrollbar when not hovered */ +.bd-sidebar:not(:hover) { + -ms-overflow-style: none; +} + +.bd-sidebar:not(:hover)::-webkit-scrollbar { + background: var(--pst-color-background); +} + +.bd-sidebar:not(:hover)::-webkit-scrollbar-thumb { + background: var(--pst-color-background); +} + +/* Avoid the border of the search box when click on it */ +.form-control:focus,:focus-visible { + border: none; + box-shadow: none; + outline: none; + background-color: var(--pst-color-background); + color: var(--pst-color-text-muted); +} diff --git a/docs/source/cloud-setup/cloud-permissions/aws.rst b/docs/source/cloud-setup/cloud-permissions/aws.rst index 740c95d5d34..e34499df3b4 100644 --- a/docs/source/cloud-setup/cloud-permissions/aws.rst +++ b/docs/source/cloud-setup/cloud-permissions/aws.rst @@ -101,15 +101,15 @@ AWS accounts can be attached with a policy that limits the permissions of the ac "Resource": "arn:aws:iam::<account-ID-without-hyphens>:instance-profile/skypilot-v1" }, { - "Effect": "Allow", - "Action": "iam:CreateServiceLinkedRole", - "Resource": "*", - "Condition": { - "StringEquals": { - "iam:AWSServiceName": "spot.amazonaws.com" + "Effect": "Allow", + "Action": "iam:CreateServiceLinkedRole", + "Resource": "*", + "Condition": { + "StringEquals": { + "iam:AWSServiceName": "spot.amazonaws.com" + } } } - } ] } diff --git a/docs/source/conf.py b/docs/source/conf.py index c0eb1b9a6f9..9a597c5c8ec 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -10,7 +10,7 @@ # -- Project information project = 'SkyPilot' -copyright = '2023, SkyPilot Team' +copyright = '2024, SkyPilot Team' author = 'the SkyPilot authors' # The version info for the project you're documenting, acts as replacement for @@ -50,7 +50,6 @@ # The main toctree document. main_doc = 'index' -pygments_style = None autosummary_generate = True napolean_use_rtype = False @@ -64,12 +63,18 @@ html_theme = 'sphinx_book_theme' html_theme_options = { # 'show_toc_level': 2, - 'logo_only': True, + 'logo': { + 'image_dark': '_static/SkyPilot_wide_dark.svg', + }, 'repository_url': 'https://github.com/skypilot-org/skypilot', 'use_repository_button': True, 'use_issues_button': True, 'use_edit_page_button': True, + 'repository_branch': 'master', 'path_to_docs': 'docs/source', + 'pygment_light_style': 'tango', + 'pygment_dark_style': 'monokai', + 'primary_sidebar_end': [], } # The name for this set of Sphinx documents. If None, it defaults to @@ -87,7 +92,7 @@ # The name of an image file (relative to this directory) to place at the top # of the sidebar. -html_logo = 'images/skypilot-wide-light-1k.png' +html_logo = '_static/SkyPilot_wide_light.svg' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico), 16x16 or 32x32 pixels. @@ -97,5 +102,5 @@ # relative to this directory. They are copied after the builtin static files, # so a file named 'default.css' will overwrite the builtin 'default.css'. html_static_path = ['_static'] -html_js_files = ["custom.js"] -html_css_files = ["custom.css"] +html_js_files = ['custom.js'] +html_css_files = ['custom.css'] diff --git a/docs/source/index.rst b/docs/source/index.rst index b132046dbf6..59e529e99f5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,11 +1,17 @@ Welcome to SkyPilot! ========================= -.. figure:: ./images/skypilot-wide-light-1k.png +.. image:: ./_static/SkyPilot_wide_light.svg :width: 60% :align: center :alt: SkyPilot - :class: no-scaled-link + :class: no-scaled-link, only-light + +.. image:: ./_static/SkyPilot_wide_dark.svg + :width: 60% + :align: center + :alt: SkyPilot + :class: no-scaled-link, only-dark .. raw:: html @@ -144,7 +150,7 @@ Documentation reference/faq .. toctree:: - :maxdepth: 0 + :maxdepth: 1 :caption: Developer Guides developers/CONTRIBUTING