Skip to content

Commit 5600229

Browse files
author
DHBaek
committed
docs: update README
1 parent df1975d commit 5600229

File tree

1 file changed

+41
-20
lines changed

1 file changed

+41
-20
lines changed

README.md

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,45 +17,66 @@
1717
## Description
1818
Worker Server for [Diffusers](https://huggingface.co/docs/diffusers/index).
1919

20-
## Installation
21-
1. Run RabbitMQ image as a Broker
20+
## How to start
21+
### Using docker-compose(recommended)
22+
1. Create RabbitMQ and FastAPI container(refer to [diffusers-inpainting-api](https://github.com/ainize-team/diffusers-inpainting-api))
23+
24+
2. Clone repository
25+
```shell
26+
git clone https://github.com/ainize-team/diffusers-inpainting-worker
27+
cd diffusers-inpainting-worker
2228
```
23-
docker run -d \
24-
--name inpainting-rabbitmq \
25-
-p 5672:5672 \
26-
-p 15672:15672 \
27-
--restart=unless-stopped \
28-
rabbitmq:3.11.2-management
29+
30+
3. Edit [docker-compose.yml](./docker-compose.yml) and [.env file](./.env.sample) for your project.
31+
- Vhost for each worker is in [docker-compose.yml](./docker-compose.yml) and common RabbitMQ config is in [.env file](./.env.sample).
32+
33+
4. Run worker container
34+
```shell
35+
docker-compose up -d
36+
37+
# If you want to run a specific worker container, write service name.
38+
docker-compose up -d <service name>
2939
```
3040

31-
2. Build Docker image
41+
### Using docker
42+
1. Run RabbitMQ comtainer as a broker
43+
```shell
44+
docker run -d --name diffusers-inpainting-rabbitmq -p 5672:5672 -p 15672:15672 --restart=unless-stopped rabbitmq:3.11.2-management
3245
```
46+
47+
2. Clone repository
48+
```shell
3349
git clone https://github.com/ainize-team/diffusers-inpainting-worker
3450
cd diffusers-inpainting-worker
35-
docker build -t inpainting-worker .
3651
```
37-
3. Run Docker Image
52+
53+
3. Build docker image
54+
```shell
55+
docker build -t diffusers-inpainting-worker .
3856
```
39-
docker run -d --name inpainting-container-0 \
57+
58+
4. Run docker container
59+
```
60+
docker run -d --name diffusers-inpainting-worker \
4061
--gpus='"device=0"' \
41-
-e BROKER_BASE_URI=<BROKER_BASE_URI> \
42-
-e VHOST_NAME=<VHOST_NAME> \
43-
-e APP_NAME=<APP_NAME> \
44-
-e DATABASE_URL=<DATABASE_URL> \
45-
-e STORAGE_BUCKET=<STORAGE_BUCKET>
62+
-e BROKER_URI=<broker_uri> \
63+
-e FIREBASE_APP_NAME=<firebase_app_name> \
64+
-e FIREBASE_DATABASE_URL=<firebase_database_urlL> \
65+
-e FIREBASE_STORAGE_BUCKET=<firebase_storage_bucket>
4666
-v <firebase_credential_path>:/app/key -v <model_local_path>:/app/model \
47-
inpainting-worker
67+
diffusers-inpainting-worker
4868
```
4969

5070
or
5171

5272
```
53-
docker run -d --name inpainting-container-0 \
73+
docker run -d --name diffusers-inpainting-worker \
5474
--gpus='"device=0"' \
5575
--env-file .env \
5676
-v <firebase_credential_path>:/app/key -v <model_local_path>:/app/model \
57-
inpainting-worker
77+
diffusers-inpainting-worker
5878
```
79+
5980
## Usage
6081
* Check our [diffusers-inpainting-api](https://github.com/ainize-team/diffusers-inpainting-api) Repo.
6182

0 commit comments

Comments
 (0)