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

Add SHARK user guide to root of docs directory (archived) #524

Closed
wants to merge 1 commit into from

Conversation

amd-chrissosa
Copy link
Contributor

@amd-chrissosa amd-chrissosa commented Nov 14, 2024

Progress on #458

This PR adds a SHARK user guide to root of docs directory and does some basic information re-architecture to point installation paths of current main readmes to the new user guide.

This PR is still a WIP (testing it) but focus is:

  • One new landing page and removal of duplicate installation paths in SD folder to point to both nightly / new release page depending on use case.
  • Incorporated a mini guide on supported options for the SD Server / Client in the user guide.
  • Changed root readme to include a path for users so that anyone who lands on the main SHARK readme can quickly get started as a non-developer.

This PR adds a SHARK user guide to root of docs directory and does some basic information re-architecture to point installation paths of current main readmes to the new user guide.
@amd-chrissosa amd-chrissosa marked this pull request as draft November 14, 2024 22:24
@@ -0,0 +1,118 @@
# SHARK User Guide
Copy link
Member

Choose a reason for hiding this comment

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

I'd personally put this at /docs/user-guide.md, but I could also see a case for /docs/users/README.md or where you have it now at docs/README.md.

Organizing into docs/users/ and docs/developers/ gives us a nice way to direct users away from guides that are less actively maintained.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's do an incremental step. I'll go with user-guide.md since that accomplishes the goal and is to understand. We can further restructure later as we get more developer-only and user-only content.


## Set up Environment

You will need a recent version of Python. We recommend also setting up a Python environment.
Copy link
Member

Choose a reason for hiding this comment

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

"Python environment" isn't very specific. Maybe suggest venv?

Suggested change
You will need a recent version of Python. We recommend also setting up a Python environment.
You will need a recent version of Python. We recommend also setting up a [Python virtual environment](https://docs.python.org/3/library/venv.html).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaning up language

Comment on lines +36 to +42
This guide assumes you'll be using pyenv. Setup your pyenv with the following commands:

```bash
# Set up a virtual environment to isolate packages from other envs.
python3.11 -m venv 3.11.venv
source 3.11.venv/bin/activate
```
Copy link
Member

@ScottTodd ScottTodd Nov 14, 2024

Choose a reason for hiding this comment

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

Hah. Python.

pyenv and Python venv are two different things. They can work together though.

https://github.com/pyenv/pyenv

If you use pyenv, you can get behavior like this:

python --version
# 3.10

pyenv install 3.11
pyenv global 3.11
python --version
# 3.11

Then when you create a venv:

python -m venv .venv
source .venv/bin/activate
python --version
# 3.11

Without venv pyenv (edit: ugh, now I'm confusing myself), you would have the code you have here:

python --version
# 3.10
python -m venv .venv
source .venv/bin/activate
python --version
# 3.10
deactivate

python3.11 -m venv 3.11.venv
source 3.11.venv/bin/activate
python --version
# 3.11

So pyenv lets you just call python as if it was python3.11, but venv is what actually isolates installed packages into a virtual environment

Comment on lines +47 to +50
pip install transformers
pip install dataclasses-json
pip install pillow
pip install shark-ai
Copy link
Member

Choose a reason for hiding this comment

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

This can be simplified now

Suggested change
pip install transformers
pip install dataclasses-json
pip install pillow
pip install shark-ai
pip install shark-ai[apps]

Comment on lines +65 to +77
## Quickstart

### Run the SD Server

Run the [SD Server](../shortfin/python/shortfin_apps/sd/README.md#Start SD Server)

### Run the SD Client

```
python -m shortfin_apps.sd.simple_client --interactive
```

Congratulations!!! At this point you can play around with the server and client based on your usage.
Copy link
Member

Choose a reason for hiding this comment

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

Let's put some context here (and/or in https://github.com/nod-ai/SHARK-Platform/blob/main/shortfin/python/shortfin_apps/sd/README.md) about what "SD" is.

The guide here should have enough information so users know what the server will do: text prompt(s) in, images out

Once we have official support for more models, we'll want to structure the user guide so there is a branch: general setup -> choose your model/app. Fine to start with the SDXL focus though.

@ScottTodd ScottTodd added the documentation Improvements or additions to documentation label Nov 14, 2024
@ScottTodd
Copy link
Member

Oh, and general tip for sending PRs on GitHub: use a branch other than main on your fork. Putting commits directly on main can be error prone since you can accidentally push to the upstream remote instead of your fork. If you have multiple branches active at a time, which one is main and which isn't?

@amd-chrissosa amd-chrissosa changed the title Add SHARK user guide to root of docs directory Add SHARK user guide to root of docs directory (archived) Nov 14, 2024
@amd-chrissosa
Copy link
Contributor Author

Deprecating this PR in favor of: #528. Second commit has all relevant changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants