Code Monkey home page Code Monkey logo

Comments (9)

tpill90 avatar tpill90 commented on August 11, 2024 1

Motivation for using Docker vs native executable

  • Keeps application isolated to container, can cleanup everything instantly by clearing containers, no polluting the host file system
  • Ease of scheduling as a recurring job using Portainer (for example)
  • Ability to limit resources, ex. CPU cores, RAM, Bandwidth
  • Simple updating via docker pull

Implementation tasks

Running select apps

docker run --user=$UID --net=host -it /
				  -v ~/.config/steamprefill:/Config 
				  steamprefill:latest select-apps-beta

from steam-lancache-prefill.

soonic6 avatar soonic6 commented on August 11, 2024 1

@ich777 found a way for me to get it run headless from a cronjob on an unraid userscript.

Maybe this will help you, too:

#!/bin/bash
 
#Variablen
CONTAINERNAME="yourCONTAINERname"
USERNAME="yourUSERNAME"
 
lxc-start --name $CONTAINERNAME
sleep 10
 
 
lxc-attach --name $CONTAINERNAME -- su $USERNAME bash -c "env TERM=xterm /home/sonic6/steam_prefill/SteamPrefill prefill"
lxc-attach --name $CONTAINERNAME -- su $USERNAME bash -c "env TERM=xterm /home/sonic6/battlenet_prefill/BattleNetPrefill prefill --products odin"
 
lxc-stop --name $CONTAINERNAME

@tpill90 your colored output generates cryptic in the Log Files, maybe you can add an option for an monochrome output?

from steam-lancache-prefill.

ich777 avatar ich777 commented on August 11, 2024 1

Keep in mind the only thing that is really necessary if you want to run it through cron you have to prepend env TERM=xterm infront of SteamPrefill prefill or whatever you are using.

This will also work if you have the application installed in a Docker container. :)

from steam-lancache-prefill.

tpill90 avatar tpill90 commented on August 11, 2024

@Kirbo I've got the docker build and publish working, its pushing up to https://hub.docker.com/r/tpilius/steam-lancache-prefill/tags if you'd like to give it a test.

from steam-lancache-prefill.

LilTrublMakr avatar LilTrublMakr commented on August 11, 2024

Is there any documentation or a compose file to using the docker version? I have it set up but the container will not start at all. I am not seeing anything. When the container starts, I get the log output of what I believe would be steamprefill --help.

Keep up the good work!

from steam-lancache-prefill.

tpill90 avatar tpill90 commented on August 11, 2024

As of right now documentation for this Dockerized version is very much a WIP, since I haven't "officially" announced support for Docker yet (don't let me discourage you from using it though, feedback is always appreciated)

I was planning on working on the documentation and having it ready prior to the official release. For the time being, you could take a look at https://gitlab.com/kirbo/steam-prefill-docker which has the docs that will eventually be integrated into this repo.

Until then, I would to hear what you've tried to do to get it running, what steps you've done, and what sort of trouble you've ran into. As well as anything that is unclear or confusing. It would certainly help me with writing helpful docs

from steam-lancache-prefill.

LilTrublMakr avatar LilTrublMakr commented on August 11, 2024

Ah. Yeah, right now I can't get it to a running state. It starts up, and exits with code 1 which is usually an application error. I'll have to wait until GitLab is back up from maintenance to read the documentation from there.

So far, all I have mounted as volumes are /app/cache and /app/config. I did not see anything else when I created the container that needed to be mounted or configured. When I start the container, all I get is the following:

SteamPrefill v1.5.0
  Automatically fills a Lancache with games from Steam, so that subsequent downloads will be 
  served from the Lancache, improving speeds and reducing load on your internet connection. 

  Start by selecting apps for prefill with the 'select-apps' command, then start the prefill using 'prefill'

USAGE
  SteamPrefill [options]
  SteamPrefill [command] [...]

OPTIONS
  -h|--help         Shows help text. 
  --version         Shows version information. 

COMMANDS
  clear-cache       Empties out temporary cached data, to free up disk space 
  prefill           Downloads the latest version of one or more specified app(s).  Automatically includes apps selected using the 'select-apps' command 
  select-apps       Displays an interactive list of all owned apps.  As many apps as desired can be selected, which will then be used by the 'prefill' command 
  select-apps-beta  Beta version of select-apps interface redesign 

You can run `SteamPrefill [command] --help` to show help on a specific command.

The container then exits with a code 1. I have also tried with the post argument of SteamPrecache select-apps and the same thing happens. Overall, I will experiment over the weekend and see if I can get it working.

I am able to manually install it and get it working on my Lancache container so that will help a lot for the time being.

As for the documentation side, most people can get by with using a 'default' docker compose file and a chart of all of the available options. Similar to the usage and parameters section of LSIO containers: https://github.com/linuxserver/docker-mariadb

My end goal is to have Lancache Bundle, Steam Prefill (and any other prefill if available), and NetData all running in the same container.

from steam-lancache-prefill.

LilTrublMakr avatar LilTrublMakr commented on August 11, 2024

So I have played with it a little more. I have found that in order to get the container to work, the end user must run the program manually from outside the container (logging in and selecting at least 1 app), and then copy the Account.config and selectedAppsToPrefill.json files in to the docker container. Then, when you run the container with the /config and /cache folders mounted to the host, and the post argument of prefill. When the container is ran, the container will run and download what is needed. Afterwards, the container stops. IMO, this is not how docker containers are supposed to work. I also don't see a way to select apps from within the container itself unless prefill is running. Really, it would be only running if it is actively downloading something.

IMHO, unless there is some major changes on how the container works or someone could point me in the direction of how to make it so the container works without shutting down, I don't think that a container is worth running. I would much rather make a script or scripts that would occasionally check for updates and/or run the precache in the main container of Lancache.

from steam-lancache-prefill.

tpill90 avatar tpill90 commented on August 11, 2024

Released as part of v1.8.1

from steam-lancache-prefill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.