Skip to content
edge20200 edited this page Apr 27, 2024 · 1 revision

There is a docker image available for Upload-Assistant that is automatically built within a few minutes of each commit.

Usage?

docker run --rm -it --network=host \
-v /full/path/to/config.py:/Upload-Assistant/data/config.py \
-v /full/path/to/downloads:/downloads \
ghcr.io/l4gsp1ke/upload-assistant:master /downloads/path/to/content --help

The paths in your config file need to refer to paths inside the docker image, same with path provided for file. May need to utilize remote path mapping for your client.

What if I want to utilize re-using torrents and I use qbit?

Add another -v line to your command to expose your BT_Backup folder, and set the path in your config to /BT_Backup

docker run --rm -it --network=host \
-v /full/path/to/config.py:/Upload-Assistant/data/config.py \
-v /full/path/to/downloads:/downloads \
-v /full/path/to/BT_backup:/BT_backup \
ghcr.io/l4gsp1ke/upload-assistant:master /downloads/path/to/content --help

What if I want to utilize re-using torrents and I use rtorrent/rutorrent?

Add another -v line to your command to expose your session folder, and set the path in your config to /session

docker run --rm -it --network=host \
-v /full/path/to/config.py:/Upload-Assistant/data/config.py \
-v /full/path/to/downloads:/downloads \
-v /full/path/to/session/folder:/session \
ghcr.io/l4gsp1ke/upload-assistant:master /downloads/path/to/content --help

What is docker?

Google is your friend

How do I update the docker image?

docker pull ghcr.io/l4gsp1ke/upload-assistant:master

How do I use an image of a specific commit?

docker run --rm -it --network=host \
-v /full/path/to/config.py:/Upload-Assistant/data/config.py \
-v /full/path/to/downloads:/downloads \
ghcr.io/l4gsp1ke/upload-assistant:abc123 /downloads/path/to/content --help

Where abc123 is the first 6 digits of the hash of the commit

Can I use this with Docker on Windows?

Yes but this is a linux container so make sure you are running in that mode. Forewarning Docker on Windows is funky and certain features aren't implemented like mounting singular files as a volume, using paths that contain spaces in a volume, and lots more so you are on your own. You will not receive help trying to get it to work.

The command for running is really long and I dont want to type it.

Make an alias or a function or something. Will depend on OS. I use

function upload(){
        # save args as array and expand each element inside of ""
        args=("$@")
        args="${args[@]@Q}"
        echo $args
        docker pull ghcr.io/edge20200/upload-assistant:master
        eval "docker run --rm -it --network=host -v /full/path/to/config.py:/Upload-Assistant/data/config.py -v /full/path/to/downloads:/downloads -v /full/path/to/BT_backup:/BT_backup ghcr.io/l4gsp1ke/upload-assistant:master ${args}"
}

This prints out the parameters passed as well so you can see for sure what is happening.

Can I utilize the -vs/--vapoursynth parameter?

No. The base docker image of alpine does not include vapoursynth in its package manager and building it or downloading portable version into python directory and configuring was decided to not be worth the extra complexity for something that probably gets very little usage and would probably break regularly. If this is important to you let us know.

Can you make the docker image smaller? It takes forever to download

No. FFmpeg and mono are thiccc and are required for functionality (taking screenshots and utilizing bdinfo). This cannot be avoided.