Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Checkbox form Field & if logic for compose files #286

Closed
nsvrana opened this issue Dec 22, 2022 · 10 comments
Closed

[REQUEST] Checkbox form Field & if logic for compose files #286

nsvrana opened this issue Dec 22, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@nsvrana
Copy link

nsvrana commented Dec 22, 2022

Is your feature request related to a problem? Please describe.
I would like to set Plex to use Quicksync for transcoding, which requires a device to be mounted in the docker compose file. While this requires the user to run

chmod -R 777 /dev/dri

outside of Tipi, once in Tipi I would like to have a checkbox when adding Plex which enables a section of the docker-compose file that mounts the device.

Right now I believe this would require me to create a second Plex in the AppStore called Plex QuickSync or something.

Describe the solution you'd like
A checkbox in the form which can enable/disable sections of the docker-compose file for a given app.

Describe alternatives you've considered
Creating duplicate apps with different features enables is the primary alternative I have considered. It may also be possible to make the app setup substantially more flexible like setting up a container on Portainer at the cost of a large increase in complexity.

@nsvrana nsvrana added the enhancement New feature or request label Dec 22, 2022
@nsvrana nsvrana changed the title [REQUEST] Checkbox form field [REQUEST] Checkbox form Field & if logic for compose files Dec 22, 2022
@nsvrana
Copy link
Author

nsvrana commented Dec 22, 2022

This could also be temporarily resolved by having local app packages in a folder that are managed by the user, but that is not a good long-term solution.

@meienberger
Copy link
Collaborator

Hello, thanks for your feedback! This seems interesting but I want to try to keep the config the least confusing possible for our users.

How would you put this to someone who doesn't know what QuickSync is?

As an alternative for more advanced users like you, you don't necessarily need to create a new app. You can edit freely the docker-compose file in apps/plex/docker-compose.yml and add your more advanced config.

I will try to document this soon as it is lacking proper explanations.

Hope this helps!

@nsvrana
Copy link
Author

nsvrana commented Dec 22, 2022

Makes sense - maybe it goes in advanced settings and eventually we can have tooltips to explain it? Feasibly, this could all be automated, the script determines available things like accelerators and enables them in the correct places. This is particularly relevant for media servers where transcoding is a huge CPU hit.

Excellent, that’s what I’ve done in the meantime. Does that get overridden when I update Plex through the interface?

@meienberger
Copy link
Collaborator

This is definitely something I'd like to support in the future. However there is a ton of work to prioritize before this but I'll keep it in mind for the future 😄

@bcurran3
Copy link

bcurran3 commented May 23, 2023

IMHO I think Plex QuickSync and NVIDIA support is a very big deal. Having the ability to use these hardware features and then not using them is a big CPU hit on the server.

Fortunately if/when I migrate to Tipi I'm capable of modifying the files to enable it myself. This brings up the question though of if I modify my (Tipi placed) docker-compose file, won't the next run of the upgrade script overwrite it?

Here's my suggestion for addressingthe problem:

  • add sliders (similar to Expose app) to the Install Plex window
  • one slider should be Enable QuickSync Transcoding
  • second slider should be Enable NVIDIA Transcoding
  • a tooltip or link should be there explaining what the option does
  • when the Install button is pushed it uses sed (or another method) to add the additional config lines to the docker-compose file. This way modification occurs "on the fly" and doesn't require multiple apps in the store or multiple docker-compose scripts taking up extra space as well.

This seems interesting but I want to try to keep the config the least confusing possible for our users.

I typically agree, BUT there is a NEED for advanced options sometimes. If you don't like them immediately facing forward, please consider an "Advanced Options" button that could then open up a new window with a disclaimer at the top (Warning! Advanced options.. blah blah... proceed with caution... blah blah... RTFM... blah blah... before using... etc.). Then there could be two options or two hundred. The fine tuning would be appreciated and modifying using sed based on flags seems (to me) to be an easy solution and could be applied universally.

@nsvrana
Copy link
Author

nsvrana commented May 23, 2023

Fortunately if/when I migrate to Tipi I'm capable of modifying the files to enable it myself. This brings up the question though of if I modify my (Tipi placed) docker-compose file, won't the next run of the upgrade script overwrite it?

Yes, but a feature has been added to enable you to create configuration which don't get overwritten. You use the customized app config option to create a docker-compose file which tipi does not override when it updates. I have been using it for quicksync since the feature was released.

See here: https://www.runtipi.io/docs/guides/customize-app-config

@DrMxrcy
Copy link
Contributor

DrMxrcy commented May 23, 2023

IMHO I think Plex QuickSync and NVIDIA support is a very big deal. Having the ability to use these hardware features and then not using them is a big CPU hit on the server.

Fortunately if/when I migrate to Tipi I'm capable of modifying the files to enable it myself. This brings up the question though of if I modify my (Tipi placed) docker-compose file, won't the next run of the upgrade script overwrite it?

Here's my suggestion for addressingthe problem:

  • add sliders (similar to Expose app) to the Install Plex window
  • one slider should be Enable QuickSync Transcoding
  • second slider should be Enable NVIDIA Transcoding
  • a tooltip or link should be there explaining what the option does
  • when the Install button is pushed it uses sed (or another method) to add the additional config lines to the docker-compose file. This way modification occurs "on the fly" and doesn't require multiple apps in the store or multiple docker-compose scripts taking up extra space as well.

This seems interesting but I want to try to keep the config the least confusing possible for our users.

I typically agree, BUT there is a NEED for advanced options sometimes. If you don't like them immediately facing forward, please consider an "Advanced Options" button that could then open up a new window with a disclaimer at the top (Warning! Advanced options.. blah blah... proceed with caution... blah blah... RTFM... blah blah... before using... etc.). Then there could be two options or two hundred. The fine tuning would be appreciated and modifying using sed based on flags seems (to me) to be an easy solution and could be applied universally.

I like the idea of this where variables can be added on the fly. There is a user-config option

https://www.runtipi.io/docs/guides/customize-app-config

For Example on my server for GoToSocial

I have a docker-compose.yml in runtipi/user-config/gotosocial

version: "3"
services:
  gotosocial:
    image: superseriousbusiness/gotosocial:0.9.0-rc2
    environment:
      - GTS_STORAGE_BACKEND=s3
      - GTS_STORAGE_S3_ENDPOINT=REDACTED
      - GTS_STORAGE_S3_USE_SSL=REDACTED
      - GTS_STORAGE_S3_ACCESS_KEY=REDACTED
      - GTS_STORAGE_S3_SECRET_KEY=REDACTED
      - GTS_STORAGE_S3_BUCKET=REDACTED
      - GTS_ACCOUNTS_ALLOW_CUSTOM_CSS=TRUE

Even with updates the config sticks, and will overrule the other compose. I use it to test images and add custom features. I would love to see this via the UI too.

@bcurran3
Copy link

Thanks guys. That customize-app-config looks like a good overrides feature that now alleviates one of my fears of migrating to Tipi.

@bcurran3
Copy link

bcurran3 commented May 23, 2023

A little more digging into my own scripts made me think more about advanced options. ( @meienberger - you're going to probably hate this. :-) ) But I like to include cpu_shares, memory, and sometimes niceness options. I want to ensure something like Plex gets lots of memory and time slices while things like *arr don't. These would be nice fine tuning advanced options to have.... and I don't really want to have to create a customize-app-config for all the containers I run (as well as contribute to the app store any deltas). Tipi could simplify these options by making the input for something like cpu_shares a value between 1 and 10 and then multiply it by 1024 before adding it to the docker-compose file on the fly.

This should probably be it's own request issue, if it gets some traction I'll open it up.

@steveiliop56
Copy link
Collaborator

Closing now since the user-config option can solve the problem reliably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants