You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**deepfill:v0** run a docker container named deepfill with version v0
240
253
254
+
### Run the DeepFill container (with Docker Compose)
255
+
In a more complex scenario where you want to leverage GPUs to run your services, it can be useful to set up a Docker Compose configuration file. For example, you can create a `docker-compose.yml` file with the following content:
256
+
257
+
```yaml
258
+
version: "3"
259
+
services:
260
+
deepfill:
261
+
image: deepfill:v0
262
+
runtime: nvidia
263
+
volumes:
264
+
- $(pwd)/:/shared
265
+
working_dir: /shared
266
+
tty: true
267
+
stdin_open: true
268
+
command: bash
269
+
deploy:
270
+
resources:
271
+
reservations:
272
+
devices:
273
+
- driver: nvidia
274
+
count: 1
275
+
```
276
+
277
+
This configuration file defines a service named `deepfill` that uses the `deepfill:v0` Docker image and leverages the nvidia runtime to utilize GPUs. The devices section maps 1 of the host's NVIDIA GPUs by using nvidia driver. This configuration file can also be useful to specify GPUs to specific services in the same compose.
278
+
279
+
After running `docker compose up -d`, you can enter the running container and start a bash session using the `docker compose exec` command. The following command can be used to enter the `deepfill` service container and start a bash session:
280
+
281
+
```bash
282
+
docker compose exec deepfill bash
283
+
```
284
+
285
+
The container will continue to run in the background, and you can start another bash session using the same command if needed.
286
+
287
+
241
288
### Download pretrained DeepFill models
242
289
243
290
Download the [pretrained models](https://github.com/JiahuiYu/generative_inpainting#pretrained-models) e.g. Places2 (places background) or CelebA-HQ (faces) and copy it to folder `model_logs`. The demo relies on it.
0 commit comments