Skip to content

Commit ea3bc43

Browse files
authored
LocalVisage: Add Docker instructions
1 parent e713635 commit ea3bc43

File tree

3 files changed

+53
-3
lines changed

3 files changed

+53
-3
lines changed

plugins/LocalVisage/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Use any base image based on glibc symbols (basically ubuntu/debian instead of alpine)
2+
FROM python:3.10-slim AS app
3+
4+
# Choose which stash version you want here
5+
COPY --from=stashapp/stash:latest /usr/bin/stash /usr/bin/stash
6+
# COPY --from=stashapp/stash:development /usr/bin/stash /usr/bin/stash
7+
8+
# Git has been added from stash's Dockerfile
9+
RUN apt-get update && apt-get install -y --no-install-recommends \
10+
ca-certificates ffmpeg libvips-tools tzdata git \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
RUN pip install --no-cache-dir \
14+
mechanicalsoup \
15+
cloudscraper \
16+
stashapp-tools
17+
18+
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
19+
20+
# 7860 is the port used by deepface server
21+
EXPOSE 7860/tcp
22+
EXPOSE 9999/tcp
23+
CMD ["stash"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
stash:
3+
image: stashapp/stash:LocalVisage
4+
container_name: stash
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
restart: unless-stopped
9+
ports:
10+
- "7860:7860"
11+
- "9999:9999"
12+
volumes:
13+
- "./config:/appdata"
14+
- "./data:/data"

plugins/LocalVisage/readme.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,27 @@ A plugin for recognizing performers from their images using [DeepFace](https://g
2020

2121
## 📦 Requirements
2222

23-
- Warning: user reported that the dependencies are not available on the docker version of stash. You'd need to make a different docker with source build dependencies and I don't know how to
24-
25-
2623
- Python 3.10.11 (temporarily, see instructions below)
2724
- `PythonDepManager`
2825
- `stashUserscriptLibrary7djx1qp` (add repo https://7djx1qp.github.io/stash-plugins)
2926
- `git` need to be installed and in the PATH
3027

28+
### Docker Usage
29+
30+
Because this plugin relies on tensorflow (the AI framework used), the official Stash docker image can't be used.
31+
See [this post](https://discourse.stashapp.cc/t/local-visage/2478/15?u=jeanpierremartinez81) for details.
32+
33+
A Dockerfile has been created as a replacement to use compatible dependencies.
34+
You can find it in the [plugin repository](https://github.com/stashapp/CommunityScripts/tree/main/plugins/LocalVisage).
35+
36+
You have two options to use this image:
37+
38+
- A working docker compose can be found in the plugin folder.
39+
- Only changes are the build section to use the modified Dockerfile, and a new port to expose that is the deepface server port (7860)
40+
- Build the image yourself
41+
- Run this to build it inside the plugin repo folder: `docker build -t stashapp/stash:LocalVisage -f Dockerfile .`
42+
- Update your stash container configuration to expose a new port: `docker run -p 7860:7860 ... stashapp/stash:LocalVisage ...`
43+
3144
## ⚙️ Tasks
3245

3346
| Task | Description |

0 commit comments

Comments
 (0)