Giter Club home page Giter Club logo

Comments (11)

cRaZy-bisCuiT avatar cRaZy-bisCuiT commented on May 23, 2024

Hi @Kreakdude,
do you have a display attached to your host running Docker? This could already solve the problem maybe.

The Container runs on AMDGPU. I tried it on an integrated 5750GE APU (Host is Debian, Proxmox host) as well as a RX 6800 on Arch Linux Host (Sway WM). Both are working fine.

I could check my config when I'm back at home if you wish.

from docker-steam-headless.

Josh5 avatar Josh5 commented on May 23, 2024

AMD and Intel GPUs don't need all the bullocks that NVIDIA GPUs do. NVIDIA has all the joy of proprietary Linux drivers and custom X display configuration.
So long as your host is set up with the required drivers, the container should "just work" with your AMD GPU.
As mentioned above, if you are having issues, it may be that you need to invest in an HDMI EDID emulator (only about $5) that will simulate a monitor plugged in. Other issues could be caused by having multiple GPUs.

from docker-steam-headless.

Kreakdude avatar Kreakdude commented on May 23, 2024

No, @cRaZy-bisCuiT I do not have a display attached. It's on a dedicated server I recently bought.

My current issue is an error saying /dev/fuse/ doesn't exist which I checked and it doesn't. I'm not sure what it is or how to get it. I'm guessing I'll get the same problem with /dev/uinput/. I don't see anything about them in the setup so there's some more room for improvement on the documentation.

Before I get farther though, I wanted to make sure I wasn't wasting my time trying to get a Radeon GPU to work with this docker image in this repo. Which it sounds like it's supposed to support AMD so I'm not wasting my time.

from docker-steam-headless.

cRaZy-bisCuiT avatar cRaZy-bisCuiT commented on May 23, 2024

I use the following ENVs with Docker Compose and that works pretty well for me:

---
services:
  steam-headless:
    image: josh5/steam-headless:debian
    restart: unless-stopped
    runtime: ${DOCKER_RUNTIME}
    shm_size: ${SHM_SIZE}
    ipc: host # Could also be set to 'shareable'
    privileged: true
    ulimits:
      nofile:
        soft: 1024
        hard: 524288
    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
      - SYS_NICE
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined

    # NETWORK:
    network_mode: host
    hostname: ${NAME}
    extra_hosts:
      - "${NAME}:127.0.0.1"
    
    # ENVIRONMENT:
    ## Read all config variables from the .env file
    env_file: .env

    # DEVICES:
    devices:
      # Use the host fuse device.
      - /dev/fuse
      # Add the host uinput device.
      - /dev/uinput
      # Add AMD/Intel HW accelerated video encoding/decoding devices (optional)
      - /dev/dri/D128
      - dev/dri/card1
    # Ensure container access to devices 13:*
    device_cgroup_rules:
      - 'c 13:* rmw'

    # VOLUMES:
    volumes:
      # The location of your home directory.
      - /opt/container-data/steam-headless/home/:/home/default/:rw

      # The location where all games should be installed.
      # This path needs to be set as a library path in Steam after logging in.
      # Otherwise, Steam will store games in the home directory above.
      - /mnt/games/:/mnt/games/:rw

      # The Xorg socket. This will be shared with other containers so they can access the X server.
      # Select only one option or leave commented out to not share the Xorg socket with any other Docker containers.
      #   Option #1) Start a X server in the container to share with any other containers.
      #- /opt/container-data/steam-headless/.X11-unix/:/tmp/.X11-unix/:rw
      #   Option #2) Use an existing X server running on the host.
      #- /tmp/.X11-unix/:/tmp/.X11-unix/:rw

      # Pulse audio socket. This will be shared with other containers so they can access the audio sink.
      # Leave commented out to not share the pulse socket with any other Docker containers.
      #- /opt/container-data/steam-headless/pulse/:/tmp/pulse/:rw

You have to make sure fuse is working for you on the host. I would have to search my history to find those settings but a google search might help here as well.

As stated by @Josh5 and me: You most likely need display connected to your server host HDMI port or a HDMI EDID emulator. I had the same problem. I did not work until I connected something to the HDMI port of the hosts GPU.

from docker-steam-headless.

Kreakdude avatar Kreakdude commented on May 23, 2024

I'm hesitating to delve into solving the missing /dev/fuse/ and /dev/uinputs/ missing paths issue if you think I'm going to run into problems regarding not having a display connected. I did have a display connected to the hardware before, will it need to stay connected? Will connecting one solve the missing paths issue? My hardware has proxmox installed first and from there I'm running an ubuntu container and that's the host for this docker image build. When I had the display hooked up the only graphical display looked like some console output telling me an local IP address and port to put into another computer's web browser. The ubuntu container is also a non-graphical installation. Knowing all this, do you still think hooking up a display will solve everything?

from docker-steam-headless.

Josh5 avatar Josh5 commented on May 23, 2024

I'm hesitating to delve into solving the missing /dev/fuse/ and /dev/uinputs/ missing paths issue if you think I'm going to run into problems regarding not having a display connected. I did have a display connected to the hardware before, will it need to stay connected? Will connecting one solve the missing paths issue? My hardware has proxmox installed first and from there I'm running an ubuntu container and that's the host for this docker image build. When I had the display hooked up the only graphical display looked like some console output telling me an local IP address and port to put into another computer's web browser. The ubuntu container is also a non-graphical installation. Knowing all this, do you still think hooking up a display will solve everything?

You dont need a full display. Just a dummy plug for like $5. But you can try to set it up and use it without one first if you like.

As for fuse, you will need to install libfuse on your host OS. That is something that should be added to the docs.
What OS are you running the Steam Headless Docker container on?

from docker-steam-headless.

Kreakdude avatar Kreakdude commented on May 23, 2024

@Josh5 the host is ubuntu but it's a container spun up by proxmox. So when I have plugged in the monitor it just shows a full screen terminal for proxmox, like it shows the local IP address and port to use to control proxmox from remote.

I commented out the /dev/fuse/ and /dev/uinputs/ in the docker compose file and it's all working EXCEPT that the game I'm testing (Geometry Wars) is like 1 fps so I'm not sure what to do to troubleshoot that.

from docker-steam-headless.

Josh5 avatar Josh5 commented on May 23, 2024

@Kreakdude, you will want to leave those 2 without comments.
Install libfuse on Ubuntu. apt install fuse.
You should already have uinput.
Make sure if you are running Ubuntu as an LXC, it is run privileged (i am not familiar with proxmox, so you will need to figure all that out).

Also, try a different game that uses directx or vulkan for testing.

from docker-steam-headless.

MNTLe-DMGD avatar MNTLe-DMGD commented on May 23, 2024

Assumption: You're using a CT container, instead of a KVM Virtual Machine.

  1. Proxmox CT containers require being run in privileged & unprotected mode to be able to access hardware (This does introduce potential security issues, and to enable those modes, you may have to spin up a new container)
  2. Setup the graphics card in the Ubuntu container as required for pass-through (See the Proxmox docs - Be sure to set it up as per the requirements for the CT containers, not the KVM Virtual Machines, they have different configurations)
  3. Make certain that the GPU can be seen and used by the Ubuntu container before spinning up the docker (Use something like nvtop - an nvidia tool, but should work on AMD GPU's)
  4. Spin up your docker, and make sure it works inside a test docker first, before running steam-headless.

These steps eliminate the possibility that steam-headless is at fault, making certain that the environment is indeed ready to run steam-headless. If everything works as intended, just passing through /dev/dri should be enough to enable hardware access for the docker container.

I personally have a Radeon 6900XT running on pass-through to a Virtual machine (not a container), and it works fine - but it DOES require a dummy plug to work. I also have a nVidia Quadro P2000 in the same machine, and they both work side by side at the same time without issue, on separate VM's, with separate installs of steam-headless.

I have never attempted to do hardware pass-through to a CT container, but after a little tweaking, it's perfectly fine inside a KVM Virtual Machine on Proxmox.

from docker-steam-headless.

Josh5 avatar Josh5 commented on May 23, 2024

Assumption: You're using a CT container, instead of a KVM Virtual Machine.

  1. Proxmox CT containers require being run in privileged & unprotected mode to be able to access hardware (This does introduce potential security issues, and to enable those modes, you may have to spin up a new container)
  2. Setup the graphics card in the Ubuntu container as required for pass-through (See the Proxmox docs - Be sure to set it up as per the requirements for the CT containers, not the KVM Virtual Machines, they have different configurations)
  3. Make certain that the GPU can be seen and used by the Ubuntu container before spinning up the docker (Use something like nvtop - an nvidia tool, but should work on AMD GPU's)
  4. Spin up your docker, and make sure it works inside a test docker first, before running steam-headless.

These steps eliminate the possibility that steam-headless is at fault, making certain that the environment is indeed ready to run steam-headless. If everything works as intended, just passing through /dev/dri should be enough to enable hardware access for the docker container.

I personally have a Radeon 6900XT running on pass-through to a Virtual machine (not a container), and it works fine - but it DOES require a dummy plug to work. I also have a nVidia Quadro P2000 in the same machine, and they both work side by side at the same time without issue, on separate VM's, with separate installs of steam-headless.

I have never attempted to do hardware pass-through to a CT container, but after a little tweaking, it's perfectly fine inside a KVM Virtual Machine on Proxmox.

Would you be willing to write up a markdown doc guide with some screenshots on how to setup for proxmox?

from docker-steam-headless.

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.