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] Rewrite run methods and deployment docs #945

Merged
merged 73 commits into from
Feb 7, 2025
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
8d6fbd9
Add dash enterprise for #1402
stichbury Jan 7, 2025
c8c4cb9
Merge branch 'main' into docs/add-dash-enterprise
stichbury Jan 15, 2025
7e1bc12
Many changes made, checkpoint
antonymilne Jan 22, 2025
a60d7ca
Many changes made, checkpoint
antonymilne Jan 22, 2025
6ca29b5
Many changes made, checkpoint
antonymilne Jan 22, 2025
0c4c28b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 22, 2025
bded348
Small fixes
antonymilne Jan 23, 2025
8ccf776
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 23, 2025
6e831f4
Merge branch 'main' into docs/add-dash-enterprise
antonymilne Jan 23, 2025
99139f2
Fix docs build
antonymilne Jan 23, 2025
c0a0b46
Fix one link
antonymilne Jan 23, 2025
1b5d04c
Quick fix of broken build
maxschulz-COL Jan 23, 2025
4f4e627
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 23, 2025
45ae546
Remaining failing link
maxschulz-COL Jan 23, 2025
45bcaf2
Merge branch 'docs/add-dash-enterprise' of github.com:mckinsey/vizro …
maxschulz-COL Jan 23, 2025
ee729cf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 23, 2025
d77eecf
Update vizro-core/docs/pages/user-guides/deploy.md
antonymilne Jan 23, 2025
58e5a2f
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 24, 2025
b9a5a06
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 24, 2025
014e452
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Jan 31, 2025
6e264a7
Add back relevant links
maxschulz-COL Jan 31, 2025
71439dd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 31, 2025
f47ded3
PR comment
maxschulz-COL Jan 31, 2025
fddda25
Merge branch 'docs/add-dash-enterprise' of github.com:mckinsey/vizro …
maxschulz-COL Jan 31, 2025
7a75a61
Update vizro-core/docs/pages/user-guides/run.md
maxschulz-COL Jan 31, 2025
133ac03
Update vizro-core/docs/pages/user-guides/run.md
maxschulz-COL Jan 31, 2025
ce961e0
PR comments
maxschulz-COL Jan 31, 2025
8622d51
Update vizro-core/docs/pages/user-guides/run.md
maxschulz-COL Jan 31, 2025
1baed40
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
186cdbe
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
3bd67bf
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
f80e38e
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
ee8a4ec
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 31, 2025
3714a1c
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
d6a8c7c
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
1c9c6b9
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
ab9aed5
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
5d5c3d6
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
592789f
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
fd5bc2b
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
75ad8bb
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
0294e93
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
9f19414
Update vizro-core/docs/pages/user-guides/run.md
maxschulz-COL Jan 31, 2025
e90402b
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
23a6fb0
Update vizro-core/docs/pages/user-guides/deploy.md
maxschulz-COL Jan 31, 2025
f5df0ec
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 31, 2025
b175bc3
Typos
maxschulz-COL Feb 3, 2025
17d1325
Rework as one page and add tables to sections
maxschulz-COL Feb 3, 2025
7aba956
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2025
2159397
Get rid of missing links etc
maxschulz-COL Feb 3, 2025
9781532
Merge branch 'docs/add-dash-enterprise' of github.com:mckinsey/vizro …
maxschulz-COL Feb 3, 2025
cfc9b7e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2025
b172743
Fix tables
maxschulz-COL Feb 3, 2025
bdfa914
Add section on Pyodide
maxschulz-COL Feb 3, 2025
e56088f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2025
c37d128
Add PyCafe section in deployment and shuffle files
maxschulz-COL Feb 3, 2025
5a8f22a
Update vizro-core/docs/pages/user-guides/run_deploy.md
maxschulz-COL Feb 3, 2025
c63fb75
Tell about clicking links
maxschulz-COL Feb 3, 2025
ad0ed53
Merge branch 'docs/add-dash-enterprise' of github.com:mckinsey/vizro …
maxschulz-COL Feb 3, 2025
4ca0259
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2025
079b745
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 3, 2025
e48bd48
Remove one HF section
maxschulz-COL Feb 3, 2025
b1ce250
fix link checker
maxschulz-COL Feb 4, 2025
2e02f7b
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 4, 2025
301f94c
Rename file
stichbury Feb 4, 2025
2636f76
Update run-deploy.md
stichbury Feb 4, 2025
57d8b56
Add link to blog
maxschulz-COL Feb 4, 2025
25dfd79
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
4ba8383
Small change
maxschulz-COL Feb 4, 2025
e1fdc44
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 4, 2025
9fd995e
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 4, 2025
2ee2737
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 6, 2025
bac91a2
Merge branch 'main' into docs/add-dash-enterprise
maxschulz-COL Feb 7, 2025
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
Prev Previous commit
Next Next commit
Many changes made, checkpoint
antonymilne committed Jan 22, 2025
commit 6ca29b585e1ead72d59ef8e5ee062d1702f975ee
24 changes: 11 additions & 13 deletions vizro-core/docs/pages/user-guides/deploy.md
Original file line number Diff line number Diff line change
@@ -55,15 +55,12 @@ The best way to get started with Vizro on Hugging Face is to copy an existing Vi
If this is your first Vizro deployment then we recommend using our ["first dashboard" example](https://huggingface.co/spaces/vizro/demo-first-dashboard). This is a minimal example that is designed to make it as simple as possible to get started. You can create your own Vizro deployment on Hugging Face based on this template as follows:

1. [Sign up for a Hugging Face account](https://huggingface.co/join).
2. Copy our example Hugging Face dashboard by duplicating our ["first dashboard" example](https://huggingface.co/spaces/vizro/demo-first-dashboard) Space. To do so, click the following button:
[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg)](https://huggingface.co/spaces/vizro/demo-first-dashboard?duplicate=true). This should open a window with the following form:
[![]](../../assets/user_guides/deploy/hugging_face_duplicate_this_space.png)
3. You do not need to alter any of the default options but if you would like to then refer to the [Hugging Face documentation](https://huggingface.co/docs/hub/en/spaces-overview#duplicating-a-space) for an explanation of each.
4. Click "Duplicate Space" to start building your Hugging Face Space. This takes around 10 seconds, and when complete you should see the following dashboard running.
[![]](../../assets/user_guides/deploy/hugging_face_space.png)
1. Copy our example Hugging Face dashboard by duplicating our ["first dashboard" example](https://huggingface.co/spaces/vizro/demo-first-dashboard) Space. To do so, click the following button: [![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg)](https://huggingface.co/spaces/vizro/demo-first-dashboard?duplicate=true). This should open a window with the following form: ![Form to duplicate Space](../../assets/user_guides/deploy/hugging_face_duplicate_this_space.png)
1. You do not need to alter any of the default options but if you would like to then refer to the [Hugging Face documentation](https://huggingface.co/docs/hub/en/spaces-overview#duplicating-a-space) for an explanation of each.
1. Click "Duplicate Space" to start building your Hugging Face Space. This takes around 10 seconds, and when complete you should see the following dashboard running. ![Running dashboard](../../assets/user_guides/deploy/hugging_face_space.png)

To turn the example app into your own, you will need to edit the code in the `app.py` file. To do so, click on the Files tab at the top of your app and select `app.py`. Click the Edit button highlighted in the below screenshot to enter an editor view of the file.
[![]](../../assets/user_guides/deploy/hugging_face_edit_app.png)
To turn the example app into your own, you will need to edit the code in the `app.py` file. To do so, click on the Files tab at the top of your app and select `app.py`. Click the Edit button highlighted in the below screenshot to enter an editor view of the file.
![Edit app.py](../../assets/user_guides/deploy/hugging_face_edit_app.png)

You can now copy and paste your app code into the editor. When you've finished editing, click "Commit changes to `main`". This immediately triggers a rebuild of your Space. As with the initial build this takes around 10 seconds, and when complete you should be able to view your own app deployed on Hugging Face!

@@ -73,15 +70,16 @@ You can now copy and paste your app code into the editor. When you've finished e
Under the hood, your Space is a Git repository. Instead of editing files through your browser, you can use `git` from the command line and the Hugging Face CLI. The Hugging Face documentation contains [full instructions](https://huggingface.co/docs/hub/en/repositories-getting-started) on how to interact with your Space's git repository. Every time you make a commit to your repository, the Space is automatically rebuilt and restarted.

In addition to `app.py`, your Space contains a few other files:
* `.gitattributes` is used by [Git Large File Storage (LFS)](https://git-lfs.com/) and is only relevant if you have files larger than 10MB. See the [Hugging Face documentation](https://huggingface.co/docs/hub/en/repositories-getting-started) for more information.
* `Dockerfile` gives instructions to configure your app's environment and start the app. See our [section on Dockerfiles](#dockerfile) for more information.
* `README.md` configures your Space, for example its title, description and licence. See the [Hugging Face documentation](https://huggingface.co/docs/hub/en/spaces-config-reference) for more information.
* `requirements.txt` gives your Python package dependencies. See our [section on dependencies](#dependencies) for more information.

- `.gitattributes` is used by [Git Large File Storage (LFS)](https://git-lfs.com/) and is only relevant if you have files larger than 10MB. See the [Hugging Face documentation](https://huggingface.co/docs/hub/en/repositories-getting-started) for more information.
- `Dockerfile` gives instructions to configure your app's environment and start the app. See our [section on Dockerfiles](#dockerfile) for more information.
- `README.md` configures your Space, for example its title, description and licence. See the [Hugging Face documentation](https://huggingface.co/docs/hub/en/spaces-config-reference) for more information.
- `requirements.txt` gives your Python package dependencies. See our [section on dependencies](#dependencies) for more information.

!!! tip
If you'd like to show your Vizro app off to the community then you can add it to our [Vizro dashboard gallery](https://huggingface.co/collections/vizro/community-demos-666987c8e9f56afc7bc1d0fc).

On Hugging Face, Vizro apps are hosted on Docker Spaces. Hugging Face has thorough documentation on [Spaces in general](https://huggingface.co/docs/hub/en/spaces-overview) and specifically on [Docker Spaces](https://huggingface.co/docs/hub/en/spaces-sdks-docker-first-demo). There are many features that go beyond simply hosting a Vizro app. For example, you can [make a collection](https://huggingface.co/docs/hub/en/collections) of multiple Spaces, collaborate on your code using [pull requests and discussions](https://huggingface.co/docs/hub/en/repositories-pull-requests-discussions), or create an [organization](https://huggingface.co/docs/hub/en/organizations) to group accounts and Spaces together.
On Hugging Face, Vizro apps are hosted on Docker Spaces. Hugging Face has thorough documentation on [Spaces in general](https://huggingface.co/docs/hub/en/spaces-overview) and specifically on [Docker Spaces](https://huggingface.co/docs/hub/en/spaces-sdks-docker-first-demo). There are many features that go beyond simply hosting a Vizro app. For example, you can [make a collection](https://huggingface.co/docs/hub/en/collections) of multiple Spaces, collaborate on your code using [pull requests and discussions](https://huggingface.co/docs/hub/en/repositories-pull-requests-discussions), or create an [organization](https://huggingface.co/docs/hub/en/organizations) to group accounts and Spaces together.

## Ploomber Cloud

8 changes: 0 additions & 8 deletions vizro-core/docs/pages/user-guides/run.md
Original file line number Diff line number Diff line change
@@ -95,16 +95,8 @@ This runs Vizro using the Flask development server and shows the resulting dashb
- Restart the Jupyter kernel and re-run your notebook.
- Add a cell containing `from vizro import Vizro; Vizro._reset()` to the top of your notebook and re-run it. With this method, there is no need to restart the Jupyter kernel.

---

start launch

!!! Flowchart?

## PyCafe

FEEDBACK LOOP

The easiest way to run a dashboard is to work on the code live on [PyCafe](https://py.cafe/).

Most of the Vizro documentation examples have a link below the code that reads "[Run and edit this code in PyCafe](https://py.cafe/vizro-official/vizro-iris-analysis)". Follow the link to open the code in PyCafe within an editor, such as the one below, which displays the dashboard and the code side by side.