mirror of
https://github.com/User0332/rewards-farmer.git
synced 2026-09-16 01:31:36 +00:00
mount the visual search image into the container
visual_search.jpg is gitignored and excluded by .dockerignore, so the container had no file at the path rewards_tasks.py uploads and the visual search task was the one task that could not run in it. Bind mount it from the project root, where src/random_image_for_visual_search.py writes it. Also add the blank line the Logging heading needs to render.
This commit is contained in:
@@ -101,6 +101,14 @@ msedge --user-data-dir="<repo>\data-dir" --profile-directory=Default https://rew
|
|||||||
|
|
||||||
Close every window of that profile afterwards. Chromium allows one process per profile directory, so a window left open on the host stops the container from starting.
|
Close every window of that profile afterwards. Chromium allows one process per profile directory, so a window left open on the host stops the container from starting.
|
||||||
|
|
||||||
|
**Provide the visual search image on the host too.** `visual_search.jpg` is not in the repository and is not built into the image, so create it once in the project root and the compose file mounts it in:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python src/random_image_for_visual_search.py
|
||||||
|
```
|
||||||
|
|
||||||
|
Without it every other task still runs; only the visual search one fails.
|
||||||
|
|
||||||
Multiple accounts work the same way in the container:
|
Multiple accounts work the same way in the container:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -108,6 +116,7 @@ REWARDS_ACCOUNTS=personal,spare docker compose run --rm rewards-farmer
|
|||||||
```
|
```
|
||||||
|
|
||||||
`REWARDS_HEADLESS=1` is set in the image. It also works on the host if you want a run with no visible window; the pointer code needs an explicit window size in that mode, which `main.py` sets.
|
`REWARDS_HEADLESS=1` is set in the image. It also works on the host if you want a run with no visible window; the pointer code needs an explicit window size in that mode, which `main.py` sets.
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
||||||
The script logs to the console. Two optional environment variables change that:
|
The script logs to the console. Two optional environment variables change that:
|
||||||
|
|||||||
@@ -27,3 +27,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# Keeps the sign-in across container rebuilds.
|
# Keeps the sign-in across container rebuilds.
|
||||||
- ./data-dir:/app/data-dir
|
- ./data-dir:/app/data-dir
|
||||||
|
# The visual search task uploads this file, which is gitignored and so is
|
||||||
|
# never in the image. Create it first with
|
||||||
|
# `python src/random_image_for_visual_search.py`; a path that does not
|
||||||
|
# exist yet is mounted as an empty directory rather than a file.
|
||||||
|
- ./visual_search.jpg:/app/visual_search.jpg:ro
|
||||||
|
|||||||
Reference in New Issue
Block a user