diff --git a/CONTAINER.md b/CONTAINER.md index 6947921..bf1dfc0 100644 --- a/CONTAINER.md +++ b/CONTAINER.md @@ -42,14 +42,14 @@ Edit the env_example file that was downloaded and enter the details for your set ## Run the container Specify which script you want to run and all of the arguments you want to pass it at the end of the line -### All mode, local storage example -Local storage mode requires you to enter the passphrase of your ssh key, which means you must pass the `-it` options and must not pass the `-d` option. After entering your passphrase, you can detach your shell from the container with `Ctrl-P, Ctrl-Q` +### All mode, remote storage example +Remote storage mode requires you to enter the passphrase of your ssh key, which means you must pass the `-it` options and must not pass the `-d` option. After entering your passphrase, you can detach your shell from the container with `Ctrl-P, Ctrl-Q` ``` -docker run -it --rm --device nvidia.com/gpu=all --name lemmy-safety -v ./env_example:/app/.env -v ./lemmy_safety.db:/app/lemmy_safety.db -v /path/to/ssh/key/on/host.key:/app/private_key lemmy-safety:latest lemmy_safety_local_storage.py --all +docker run -it --rm --device nvidia.com/gpu=all --name lemmy-safety -v ./env_example:/app/.env -v ./lemmy_safety.db:/app/lemmy_safety.db -v /path/to/ssh/key/on/host.key:/app/private_key ghcr.io/db0/lemmy-safety:main lemmy_safety_remote_storage.py --all ``` ### Daemon mode, object storage example: Object storage mode does not require you to interact with the container, so you can pass the `-d` option. ``` -docker run -d --rm --device nvidia.com/gpu=all --name lemmy-safety -v ./env_example:/app/.env -v ./lemmy_safety.db:/app/lemmy_safety.db lemmy-safety:latest lemmy_safety_object_storage.py +docker run -d --rm --device nvidia.com/gpu=all --name lemmy-safety -v ./env_example:/app/.env -v ./lemmy_safety.db:/app/lemmy_safety.db ghcr.io/db0/lemmy-safety:main lemmy_safety_object_storage.py ``` diff --git a/Dockerfile b/Dockerfile index a6adeaa..578e7ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,7 @@ FROM docker.io/python:3.10-slim-bookworm WORKDIR /app COPY lemmy_safety lemmy_safety -COPY lemmy_safety_local_storage.py lemmy_safety_local_storage.py -COPY lemmy_safety_object_storage.py lemmy_safety_object_storage.py +COPY *.py . COPY requirements.txt requirements.txt ENV PYTHONPATH='/app'