Skip to content

Commit

Permalink
feat: Add Dockerfile and update README for Docker usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
provos committed Jan 3, 2025
1 parent d855a6b commit 419901a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

FROM python:3.10-slim

RUN apt-get update && apt-get install -y git ffmpeg
COPY requirements.txt /app/
WORKDIR /app
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app

EXPOSE 8050

# The .cache directory will be optionally bound to /root/.cache/
VOLUME ["/root/.cache/"]

# The working directory can be mounted to /app/workdir
VOLUME ["/app/workdir"]

CMD ["python", "webui.py"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ A Dash based Web UI provides a browser assisted workflow to generated slices fro

![Web UI 3D Example](example/webui_3d.jpg)

## Docker Usage
Build the container, then run it while mounting the .cache directory for models and another directory for application state:
```
$ docker build -t parallax-maker .
$ docker run -it -p 8050:8050 \
-v /path/on/host/.cache:/root/.cache/ \
-v /path/on/host/workdir:/app/workdir \
parallax-maker
```

# Advanced Use Cases
Parallax Maker also supports the Automatic1111 and ComfyUI API endpoints. This allows the tool to utilize GPUs remotely and potentially achieve much higher performance compared to the local GPU. It also means that it's possible to use more specialzied inpainting models and workflows. Here is [an example](example/workflow.json) ComfyUI inpainting workflow that makes use the offset lora published by Stability AI.

Expand Down

0 comments on commit 419901a

Please sign in to comment.