|
1 | 1 | <div align="center"> |
2 | 2 |
|
3 | | -<h1>Template | Worker</h1> |
| 3 | +<h1>Stable Diffusion v1.5 | Worker</h1> |
4 | 4 |
|
5 | 5 | [](https://github.com/runpod-workers/worker-template/actions/workflows/CD-docker_dev.yml) |
6 | 6 |
|
7 | | -🚀 | A simple worker that can be used as a starting point to build your own custom RunPod Endpoint API worker. |
8 | 7 | </div> |
9 | 8 |
|
10 | | -## 📖 | Getting Started |
| 9 | +## RunPod Endpoint |
11 | 10 |
|
12 | | -1. Clone this repository. |
13 | | -2. (Optional) Add DockerHub credentials to GitHub Secrets. |
14 | | -3. Add your code to the `src` directory. |
15 | | -4. Update the `handler.py` file to load models and process requests. |
16 | | -5. Add any dependencies to the `requirements.txt` file. |
17 | | -6. Add any other build time scripts to the`builder` directory, for example, downloading models. |
18 | | -7. Update the `Dockerfile` to include any additional dependencies. |
| 11 | +This repository contains the worker for the SDv1 AI Endpoints. The following docs can be referenced to make direct calls to the running endpoints on runpod.io |
19 | 12 |
|
20 | | -### CI/CD |
| 13 | +- [Stable Diffusion v1](https://docs.runpod.io/reference/stable-diffusion-v1) |
| 14 | +- [Anything v3](https://docs.runpod.io/reference/anything-v3) |
| 15 | +- [Anything v4](https://docs.runpod.io/reference/anything-v4) |
| 16 | +- [OpenJourney](https://docs.runpod.io/reference/openjourney-sd-v15) |
21 | 17 |
|
22 | | -This repository is setup to automatically build and push a docker image to the GitHub Container Registry. You will need to add the following to the GitHub Secrets for this repository to enable this functionality: |
| 18 | +## Docker Image |
23 | 19 |
|
24 | | -- `DOCKERHUB_USERNAME` | Your DockerHub username for logging in. |
25 | | -- `DOCKERHUB_TOKEN` | Your DockerHub token for logging in. |
26 | | -- `DOCKERHUB_REPO` | The name of the repository you want to push to. |
27 | | -- `DOCKERHUB_IMG` | The name of the image you want to push to. |
| 20 | +The docker image requires two build arguments `MODEL_URL` and `Model_TAG` to build the image. The `MODEL_URL` is the url of the model repository and the `Model_TAG` is the tag of the model repository. |
28 | 21 |
|
29 | | -The `CD-docker_dev.yml` file will build the image and push it to the `dev` tag, while the `CD-docker_release.yml` file will build the image on releases and tag it with the release version. |
30 | | - |
31 | | -## Best Practices |
32 | | - |
33 | | -Models should be part of your docker image, this can be accomplished by either copying them into the image or downloading them during the build process. |
34 | | - |
35 | | -If using the input validation utility from the runpod python package, create a `schemas` python file where you can define the schemas, then import that file into your `handler.py` file. |
| 22 | +```bash |
| 23 | +docker build --build-arg MODEL_URL=https://huggingface.co/runwayml/stable-diffusion-v1-5 --build-arg MODEL_TAG=main -t runwayml/stable-diffusion-v1-5 . |
| 24 | +``` |
0 commit comments