• 0 Posts
  • 36 Comments
Joined 1 year ago
cake
Cake day: August 22nd, 2023

help-circle
  • podman-compose definitely got better over the past year…

    But you can also use docker-compose itself with podman instead!

    https://www.redhat.com/en/blog/podman-docker-compose

    Basically, for system level containers, you can do:

    sudo systemctl start podman.socket
    

    (or enable --now instead of start if you want it to stick around after rebooting)

    Then use docker-compose and it’ll communicate with podman instead of docker.

    For user session “rootless” containers, it’s mainly the same thing, except you’ll need to remove sudo and then add --user after start or enable in that systemctl command. And you’d need to set an environment variable (either prefixing it on the command or using export to set it in your session), like this:

    DOCKER_HOST=unix:///run/user/$UID/podman/podman
    

    (Put that in front of the docker-compose command and it’ll connect to podman as your user instead, provided the service is available. Or toss it into your .bashrc with "export " before it and new bash sessions would have it.)

    https://brandonrozek.com/blog/rootless-docker-compose-podman/

    The one big gotcha I’ve hit is that if you have SELinux on your system, you’ll want to add :z to your volume(s) mount to have it automatically deal with SELinux stuff. (Lowercase z for volumes that can be mounted for multiplayer containers and uppercase Z for volumes that are tied to a specific container.)

    But, I’ve found that using “quadlet” service files is much, much better than using podman-compose or docker-compose. There’s a program called “podlet” that can even convert compose files to service files (quadlet)… It can convert command line flags and kubes and other formats too.

    Quadlets are basically systems service files that integrate with podman, letting you easily set up a container as a system (or even user level) service, making managing a container just like managing any other service.

    Here’s the podlet command that’ll convert things to quadlets: https://github.com/containers/podlet


  • Yep, ArcMenu (@ https://gitlab.com/arcmenu/ArcMenu which is the maintained one, last updated days ago instead of years ago) has a ton of different layouts which can mimic any version of Windows, and so much more.

    screenshot of ArcMenu layout settings, with the "modern" category expanded

    When using GNOME, use the “Extensions Manager” app (from Flathub) to search for “ArcMenu” and install it, then you can configure it there in the Extensions Manager app as well. In the ArcMenu configuration, go to layouts and select the modern group to see something like the screenshot above. (The previews are generic wireframe sketches; the result will look much more high fidelity.)




  • For what it’s worth, you are supposed to be able to access documents stored in OneDrive in Linux. (I haven’t tried it myself; I’m just aware of it.)

    Basically: Go to GNOME’s settings, then select online accounts, and sign into OneDrive.

    Here the same instructions with lots of details and screenshots: https://www.omgubuntu.co.uk/2024/04/set-up-onedrive-file-access-in-ubuntu (Nothing in that link is Ubuntu specific. This applies to other distros too, like Fedora, Debian, Arch, Mint, etc. — as long as you have GNOME 46.)

    Other desktops have to use various other options, but aren’t natively integrated: https://linuxstans.com/microsoft-onedrive-on-linux/


    Of course, once you have access to files like this, you’ll probably want to copy them locally and back them up yourself.

    (I suspect Microsoft was trying to make it so people don’t lose their files, ironically, by handling document storage themselves? It’s still absurd that they do this so aggressively.)

    My favorite backup software is Pika. It’s powered by Borg, has a friendly UI, and supports both local (including USB drives) and remote locations. https://flathub.org/apps/org.gnome.World.PikaBackup

    Deja Dup is also good and uses Duplicity behind the scenes. https://flathub.org/apps/org.gnome.DejaDup

    There are a ton of other backup solutions too, including Vorta (another UI for Borg) and a bunch of command line tools, like rclone, rsync, etc.


  • Doesn’t distrobox (and podman) come with SteamOS these days too?

    You wouldn’t be able to layer, but using distrobox-export from inside a distrobox container would let you export command line apps as well as graphical ones too. The graphical apps will even show up in your menu and can be pinned as well.

    (Of course, if something is available on Flathub already as a Flatpak, installing the app via Discover is easier and better. While Flathub has a lot of apps, it doesn’t have everything, so being able to pick and choose from any distribution using distrobox is nice for a very large selection of software.)


  • Riker catches an alien “virus” (from a plant) and lays down naked under a shiny blanket for the rest of the episode. Pulaski forces Riker to dream of the most boring and worst segments from season 1 and 2.

    Most shows have flashback episodes that feature highlights. TNG had a clip show that showcased the worst segments. It was the most lackluster finale episode of any Star Trek season. And this was even well after Riker “grew the beard”.



  • darktable, hands down. It has a learning curve, but it’s a pro app and app pro apps have learning curves.

    The linear pipeline is great, masking is superb, and the app keeps getting better every release.

    The one downside is that darktable is not opinionated by default (so raw files look a little flat to begin with, without doing anything), but it’s customizable that you can even change that with auto applied presets. On the other hand, it does let you do what you want to do with an image, versus fighting with defaults (which is what it’s like to edit something in Lightroom, if you want to diverge from what it suggests by default).

    There are a bunch of great tutorials on YouTube and you’ll want to check out https://discuss.pixls.us/ too. Create an account on the Pixls forum, read some threads, try out some “play raws” (where people post their raw files under a CC license and then lots of people try their own take at editing it and post their edit).

    Rico Resolves has a half hour getting started video for darktable 4.6 at https://youtu.be/ucjAmTMIEOI

    Anything from Bruce Williams https://youtube.com/@audio2u and Boris Hajdukovic https://youtube.com/@s7habo are both great too, and more people are posting darktable videos all the time as well.

    The documentation for darktable is actually very good as well. Do not skip it. You don’t have to read it all, but try reading the intro parts and going back to it when you want some reference on how a part of darktable works. https://docs.darktable.org/usermanual/4.6/en/

    Some tips:

    • You can right click on sliders to get a special UI and you can also enter numbers (often even outside the bounds of what the slider would normally permit).

    • Modules will be applied in the best order regardless of which one you work on first.

    • There are some somewhat redundant modules, as darktable did start out as a “display referred” workflow (just like most all of the other raw editors everywhere) and moved to a “scene referred” (aka “linear rgb”) workflow, which provides better editing, improved color handling, vastly better tone mapping, and so on. If there are two similar modules, try to go with the version that has “RGB” in its title. Older modules still exist mainly for older edits. (You can also change darktable back to the old display referred workflow in the settinfs, but I strongly suggest to not do this. Scene referred is much better.)

    I used to shoot film and do darkroom stuff years ago. I’ve used Aperture on OS X. I used Lightroom on OS X and then on Windows. A few years ago, I switched to darktable on Linux… and darktable has gotten so, so much better each release. When I switched years ago, it was more or less a Lightroom competitor (with some advantages and disadvantages). But darktable is really amazing software now, and can give you much better results than Lightroom, when you know how to use it.


  • For the video problem, it might be codecs; try using Proton-GE if it’s in Steam or use Wine-GE if not. (IIRC, Steam will often convert the videos and give you the converted ones in the shader caching if necessary. But those outside of Steam, and sometimes a few still in Steam don’t have that workaround.)

    For the main issue you’re having, try running those games in gamescope, which itself is a compositor with a bunch of neat tricks. In this case it’d make sure to not lose the focus of the game even if the gamescope window loses focus. It can also optionally force windowed or fullscreen modes, upscale (even with FSR1), and lock the framerate.

    Changing settings in the game itself between fullscreen or borderless (borderless should usually help with the focus issues) may help too, if the game has that setting, but then you’ll probably hit the borders issue due to FVWM. (I don’t know if you’d get the fullscreen unredirection optimization in fvwm. That could be a reason to pick one or the other for you too.)

    You’re probably hitting a few edge cases by using FVWM versus a more modern environment like GNOME or KDE, but to be fair I’ve seen the focus issue happen before on a game on running through Heroic on GNOME with more than one monitor before. FWIW: I don’t remember seeing the issue in games from Steam. (It probably depends on the game itself, however.)


  • Penpot works perfectly on Linux, and you can even host it yourself in your own computer if you want. It’s web-based and works in both Firefox and Chromium browsers. (I think WebKit ones too, but it’s been a little while since I’ve tried it with Epiphany.)

    I use Penpot myself all the time on Linux, but I’m usually using the hosted version so I can collaborate with others without having to maintain a server. I have also run locally in a container using Podman, even with Podman’s rootless support.

    But to start using it, all anyone needs to do is point their browser of choice to https://design.penpot.app/ and sign in. There is no setup process or installation needed; self-hosting is completely optional.


  • Just pointing this out, as there are non-free services that the apps use:

    Frog is awesome, but note that while Frog works offline for OCR, it has TTS (text to speech) which uses an online service. As long as you avoid having it read to you, it’s all done locally.

    And Dialect always uses an online service. Some of the servers are FOSS, but some aren’t. But everything you type or paste into it is sent somewhere else. (This is the case with using translation websites too, of course.) I’m not saying you shouldn’t use it; I’m just saying that you should be aware.

    Hopefully Dialect will add Bergamot (what both Firefox by default & the “translate locally” extension use for translation) at some point. Dialect has a longstanding issue about it, but no forward motion yet. https://github.com/dialect-app/dialect/issues/183

    For something open source that runs completely on your computer for translations, you’d want Speech Note. https://flathub.org/apps/net.mkiol.SpeechNote It’s Qt based, but works well. In addition to translation, it can do text to speech and speech to text too. You do have to download models first (easily available as a click in the app), but everything, including the text you’re working with, is all done locally.

    I use both Frog and Speech Note all the time on my computer (GNOME on Fedora Linux). They’re excellent.


  • Agreed.

    Additionally, the graphic oversimplifies things as well. The resulting genetically modified crop is often not even all that close close to the same as the non-GMO, as seen by studies such as this one:

    https://enveurope.springeropen.com/articles/10.1186/s12302-023-00715-6

    Basically; GMO soybeans contain proteins which differ and also include additional proteins. This can cause allergic reactions to modified soy where non-modified soy might not cause an issue.

    Monsanto supposedly even knew about these proteins and higher risk of allergic reaction and chose to not disclose it. (I saw some research that mentioned this years ago… It’d be hard to find the exact source I read back then.) This specific paper, which talks about additional proteins and side-effects brought in by the new transgenic splicing, also explicitly states that Monsanto did studies themselves and failed to report relevant findings:

    https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5236067/

    Obviously, other methods can also change proteins too, but these papers show it isn’t as clear cut as the graphic in the original post claims.

    Along these lines, here’s a study that finds differences not just in soybeans grown organically versus ones treated by glyphosate (Monsanto Round-Up pesticide) but also between GMO and non-GMO crops, both treated by the pesticide.

    https://www.sciencedirect.com/science/article/pii/S0308814613019201

    But, yeah this is just a long way of agreeing with the parent post and saying that the end goal is to make the plants resistant to poison, not to make them better for humans, all to make more money. (In this case, Monsanto is even double-dipping by selling both the pesticide and the crops tailor-made for the pesticide.)

    Other GMO crops might be closer to the original crop and might also actually be beneficial for humans without drawbacks. However, Monsanto’s soybeans are problematic, and other crops might be as well, especially if they’re made by companies who have money as their primary goal.




  • Yeah, that’s a big, weird if though. Most modern apps can rely on the runtimes for their dependencies and not have to ship their own custom dependencies.

    It’s different from something like AppImage, where everything is bundled (or Snap, where a lot more needs to be bundled than a typical Flatpak, but not as much as with an AppImage).

    Additionally, there’s always some level of sandboxing in Flatpaks (and Snap packages) and none at all for RPMs, Debs, or AppImages.

    Also, Flatpak dedupicates common files shared across flatpak apps and runtimes, so there isn’t “bloat” like what you’re talking about.

    https://blogs.gnome.org/wjjt/2021/11/24/on-flatpak-disk-usage-and-deduplication/




  • Yeah, some of the smaller models are even reasonable on my old laptop in CPU mode.

    General rule of thumb: The larger the model, the better it is. But not necessarily. 😉 I’ve found zephyr and mistral are both quite good for a tradeoff and work on CPU. Of the ones that really need more RAM and/or a GPU with a lot of vRAM, mixtral seems like the best.

    Additional fun is to use a Modalfile (which is like a Containerfile, but is a recipe for models instead of containers) to customize a local model on top of one of the existing ones.

    For a simple one to demonstrate, I have a system instruction to output everything in the form of the poem “This Is Just To Say”, but customized per topic.

    It really works best with mixtral (I’ve tried other ones, especially smaller ones):

    FROM mixtral
    PARAMETER temperature 1
    SYSTEM """
    You will respond to everything in a modified poem in the form of "This Is Just To Say" by William Carlos Williams, except change all the specifics to be what the subject is. Do not say any other text. Try to make the syllables the same as the original and use the same formatting.
    
    You can expand in length in responses when there is too much to talk about, but keep the format and style of the poem.
    
    Do not respond in any other way.
    
    For reference, the full poem is:
    
    I have eaten
    the plums
    that were in
    the icebox
    
    and which
    you were probably
    saving
    for breakfast
    
    Forgive me
    they were delicious
    so sweet
    and so cold
    """
    

    Yes, you just instruct the system with natural text like that and it (usually) abides. I tried it without the poem being referenced inline, and it mostly worked fine… but it works even better being mentioned in the file.

    I have that saved in ~/Projects/ollama/ as Modelfile.fun-plums

    I run the server almost as above, but now also pass in my ollama project directory as a mounted volume with z (for SELinux mapping)… don’t forget to have run sudo setsebool container_use_devices=true first, else it won’t work:

    podman run --detach --replace --device /dev/kfd --device /dev/dri --group-add video -v ollama:/root/.ollama -p 11434:11434 -v ~/Projects/ollama:/models:z --name ollama ollama/ollama:0.1.24-rocm
    

    (You can run this command if you already have the server running. It will replace it with the new one. This is for AMD. You’d want to use the NVidia or CPU container if you don’t have an AMD card. The CPU container is the fasted to download. The version here is newer than the one for AMD that I listed above, so it might be a multi-gigabyte download if you don’t have this new one yet. The important and new part is ~/Projects/ollama:/models:z)

    Then, create the model. This will be almost instant if you already have the base model downloaded (in this case, mixtral), otherwise it will auto-download the base model:

    podman exec -it ollama ollama create fun-plums -f /models/Modelfile.fun-plums
    

    (The path to the model in this command is the internal path from the point of view within the container.)

    Then, you run it like any other model.

    Here’s me running it, and bringing up the topic of leftover pizza.

    $ podman exec -it ollama ollama run fun-plums
    >>> pizza
     I have consumed
    the pizza
    that was on
    the counter
    
    and which
    you were likely
    saving
    for lunch
    
    Forgive me
    it was satisfying
    so tasty
    and so warm
    

    You can also paste the text from the reader mode of an article and it’ll summarize it with a poem based on that one. 🤣

    For example, copying and pasting the text from https://www.theverge.com/2024/2/10/24068931/star-wars-phantom-menace-theater-showings-25th-anniversary-may resulted in:

     I have watched
    the Phantom Menace
    that was on
    the silver screen
    
    and which
    you may have
    missed or
    disliked once
    
    Forgive me
    it has charm
    a new sheen
    and Darth Maul
    

  • FOSS apps (all on Flathub)

    Some of the AI related apps I’ve been using that are both Free Software and offline (where it runs on your computer without using network services in the cloud) are:

    • OCR: “Frog” can take screenshots, select images, accept drag and drop, and you can paste an image from the clipboard. It’ll read the text on the images and immediately have a text area with the result. https://flathub.org/apps/com.github.tenderowl.frog — it’s powered by Tesseract. Note: The completely optional text-to-speech that Frog has does use an online service. But the rest is offline.

    • Speech to text: “Speech Note” does text to speech, speech to text, and translations… all locally on your computer, and it supports GPU acceleration (which isn’t needed, but it makes it a little faster). https://flathub.org/apps/net.mkiol.SpeechNote — This is basically the all-in-one “Swiss army knife” of ML text processing. Thanks to being a Flatpak, you don’t have to do anything special for the dependencies. It’s all taken care of for you. It also has tons of different models (for different voices, different backends) all available from within the UI, which just needs a click for downloading.

    • Upscaling images: There are two that do something similar, using some of the same backends. A nice and simple one is “Upscaler”. https://flathub.org/apps/io.gitlab.theevilskeleton.Upscaler Another one that’s cross platform is “Upscaylhttps://flathub.org/apps/org.upscayl.Upscayl — these both use ESRGAN and Waifu2x in the background.

    • Closed captioning: “Live Captions” uses an ML model to transcribe text realtime. It’s wonderful for when a video doesn’t have subtitles, or when you’re participating in a video call (which might also not have CC). There’s also a toggle mode that will transcribe based on microphone input. The default is to use system audio. https://flathub.org/apps/net.sapples.LiveCaptions

    • Web page translations: Firefox, for the past few releases, has the ability to translate web pages completely local in-browser. It does need to download a small model file (a quantized one around 20 megabytes per language pair), but this happens automatically on first use. All you need to do is click the translate icon (when it’s auto-detected) or go to the menu and select “Translate page…”. Firefox is located in your distribution already (and is usually installed by default in most Linux distributions) and is available as an official package from Mozilla on Flathub as well. Newer versions keep improving on this, improving speed (it’s pretty quick already), improving accuracy, improving reliability (sometimes you have to try to translate a couple of times on some pages), and adding languages. But what’s there in the release of Firefox is already great.

    Chat and image generation (more advanced)

    While all the above are graphical apps and on Flathub (some may have distro packages too), there are some additional AI/ML things you can run on Linux as well:

    • Chat ML: “Ollama” (https://ollama.ai/) is a friendlier wrapper around llama.cpp and lets you run a variety of models (some FOSS, some just source-available-and-gratis, some not at all).

    You can run Ollama in a container to make it even easier. Even a Podman container on your user account works. (You don’t need to set it up as a system container.) The instructions for Docker work on Podman (just swap the docker command for podman instead).

    While the official instructions only list CPU (which is fine for some of the smaller models) and NVidia, it’s also possible to use an AMD GPU too:

    # Enable device as user (run once per boot)
    sudo setsebool container_use_devices=true
    
    # Set up the ollama server for AMD acceleration (run once per session)
    podman run --pull=always --replace --detach --device /dev/kfd --device /dev/dri --group-add video -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:0.1.22-rocm
    
    # Command-line interaction (run any time you want to use it — the last part is which model you want to use)
    podman exec -it ollama ollama run llama2
    

    llama2 is the default ML; there are so many others available. Mixtral is a good one if you have enough vram on your GPU. Whatever you specify, it will auto-download and set it up for you. You only need to wait the first time. (The ROCm version of takes a while to download. Each model varies. The good thing is, it’s all cached for subsequent uses.)

    If you want a web UI like ChatGPT, then you could also run this instead of the command line interaction command:

    podman run -d --replace -p 3000:8080 --add-host=host.docker.internal:host-gateway -v ollama-webui:/app/backend/data --name ollama-webui ghcr.io/ollama-webui/ollama-webui:main
    

    …and visit http://localhost:3000/

    When done, run podman stop ollama and podman stop ollama-webui to free up resources from your GPU.

    There are also integrations for text editors and IDEs, similar to GitHub’s CoPilot. Neovim has a few already. VS Code (or VS Codium) has some too (like twinny and privy).

    • Image generation: “Stable Diffusion” is the go-to here. There are a bunch of forks. Some of the better ones are:

    Krita, GIMP, and Blender all have plugins that can interface with some of these too (usually using a SD Automatic111 API).

    For Stable Diffusion on AMD, you need to have ROCm installed and might need to set or use an environment variable to make it work with your card. Something like: HSA_OVERRIDE_GFX_VERSION=11.0.0 or HSA_OVERRIDE_GFX_VERSION=10.3.0 (depending on your GPU). Prefixing means just putting that at the beginning of the the command with a space and then the rest of the command. Setting it as a variable depends on your shell. You might need to export it for some (like for bash). Prefixing it is fine though, especially when you use ctrl+r to do a substrang search in your shell history (so you don’t need to retype it or remember silly-long commands).

    As using these image generating apps pulls down a lot of Python libraries, I’d suggest considering setting up a separate user account instead of using your own, so the app doesn’t have access to your local files (like stuff in ~/.ssh/, ~/.local/, your documents, etc.). Setting up containers for these is not so easy (yet), sadly. Some people have done it. And they do run in a toolbox or distrobox podman container… but toolbox and distrobox containers don’t really contain so much, so you’re better off using podman (with a “docker” container) directly or running it as a separate account for some type of isolation from your user account files.

    Everything else above is at least contained (via containers or Flatpak) to some degree… but stuff locally via pip installs can do anything. And it’s not just hypothetical either, for example: PyTorch nightly was compromised for a few days on Christmas of 2022.

    There are some graphical apps on Flathub for connecting to Stable Diffusion and a ChatGPT AI (which ollama now has)… but in the course of setting them up, you basically have a web and/or text-based UI to interact with.