-
Notifications
You must be signed in to change notification settings - Fork 29
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
Conversation
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.
@@ -0,0 +1,118 @@ | |||
# SHARK User Guide |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
?
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaning up language
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 | ||
``` |
There was a problem hiding this comment.
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
pip install transformers | ||
pip install dataclasses-json | ||
pip install pillow | ||
pip install shark-ai |
There was a problem hiding this comment.
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
pip install transformers | |
pip install dataclasses-json | |
pip install pillow | |
pip install shark-ai | |
pip install shark-ai[apps] |
## 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. |
There was a problem hiding this comment.
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.
- Link to https://stablediffusionxl.com/
- The page at https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0 has a good overview:
Model Description: This is a model that can be used to generate and modify images based on text prompts.
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.
Oh, and general tip for sending PRs on GitHub: use a branch other than |
Deprecating this PR in favor of: #528. Second commit has all relevant changes. |
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: