Skip to content

Commit a9d2d3f

Browse files
committed
2 parents bbd9ae7 + 621f640 commit a9d2d3f

File tree

13 files changed

+174
-396
lines changed

13 files changed

+174
-396
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: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,38 @@ A plugin for recognizing performers from their images using [DeepFace](https://g
2020

2121
## 📦 Requirements
2222

23-
- Python 3.10.11 (temporarily, see instructions below)
23+
- Python 3.10.11 (temporarily, see instructions below)
2424
- `PythonDepManager`
25-
- `stashUserscriptLibrary7djx1qp` (add repo https://7djx1qp.github.io/stash-plugins/
25+
- `stashUserscriptLibrary7djx1qp` (add repo https://7djx1qp.github.io/stash-plugins)
26+
- `git` need to be installed and in the PATH
27+
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+
- Use this command to rebuild your docker container: `docker compose up -d --build --pull always`
41+
- Build the image yourself
42+
- Run this to build it inside the plugin repo folder: `docker build --pull -t stashapp/stash:LocalVisage -f Dockerfile .`
43+
- Update your stash container configuration to expose a new port: `docker run -p 7860:7860 ... stashapp/stash:LocalVisage ...`
44+
45+
Once this image is built and running, you can skip the "Set Python Path" step below and enjoy the plugin!
46+
47+
> [!NOTE]
48+
> If you use a reverse proxy, you may encounter difficulties setting up the redirection to the deepface server.
49+
>
50+
> URL used by the plugin is hardcoded inside the `frontend.js` file:<br>
51+
> `window.location.protocol + "//" + window.location.hostname + ":7860"`
52+
>
53+
> e.g. using `https://stash.example.org` will send requests to `https://stash.example.org:7860`.<br>
54+
> But worse, using `https://example.com/stash` will use `https://example.com:7860`
2655
2756
## ⚙️ Tasks
2857

plugins/SecondaryPerformerImage/SecondaryPerformerImage.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/SecondaryPerformerImage/SecondaryPerformerImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Add secondary performer image
22
description: Adds support for a secondary perfomrer image on the perform details page.
33
url: https://github.com/stashapp/CommunityScripts
4-
version: 1.0
4+
version: 1.1
55
settings:
66
imageMode:
77
displayName: Image Mode

plugins/TPDBMarkers/TPDBMarkers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: The Porn DB Markers
22
description: Sync Markers from The Porn DB aka theporndb.net
3-
version: 0.4.2
3+
version: 0.4.3
44
url: https://github.com/stashapp/CommunityScripts/
55
exec:
66
- python

plugins/TPDBMarkers/tpdbMarkers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def processScene(scene):
6161
# skip if there is already a group linked
6262
if settings["createMovieFromScene"] and len(scene.get("groups", [])) == 0:
6363
groups=[]
64-
for g in data["groups"]:
64+
for g in data["movies"]:
6565
group=processGroup(g)
6666
if group:
6767
groups.append({"group_id": group["id"],"scene_index":None})

plugins/discordPresence/README.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)