Jump to content

juan11perez

Members
  • Posts

    192
  • Joined

  • Last visited

Posts posted by juan11perez

  1. Ok so I got the debian bullseye container to work passing an nvidia gpu and using docker.... :-)

    It's transcoding plex, frigate and possibly any other container

     

    I've tried documenting my procedure in a readme.txt

    I've also created a script (system_config.sh) to install all requirements.

    I'm also sharing my container <<dockerhost>> config file.

     

    I'm attaching all docs.

     

    I'm by no means an expert, I got it working after several hours of trial and error, but I'll try to answer questions. I've included the sources of info in the readme.txt

     

    @ich777 thank you again

     

     

    files.zip

    • Like 4
  2. thank you. I'm just taking the opportunity to learn something new with this plugin.

    For instance I learned why staic ip instructions in the container conf dont work ------- again the culprit systemd 

    And learned a workaround. interesting!

     

    38 minutes ago, ich777 said:

    I would rather recommend to install the drivers in the Container.

     

    So I'll give it a go with installing the drivers in the container. 

     

     

    38 minutes ago, ich777 said:

    Have you installed to container runtime in the container?

     

    I haven't. I've not worked out how to do it. I thougut it was with 

        sudo apt-get install -y nvidia-docker2
        sudo pkill -SIGHUP dockerd

     

     

    I run docker quite extensively in unraid and have no issues whatsoever. So no urgency or similar.

     

    Thank you for taking the time to answer and producing/sharing this component

     

    • Like 1
  3. Good day, has anyone been able to run a gpu within the container?

     

    I've managed to pass it into the container by following this guide with the addition of an extra parameter:

     

    # Allow cgroup access
    lxc.cgroup.devices.allow = c 195:* rwm
    lxc.cgroup.devices.allow = c 243:* rwm
    lxc.cgroup.devices.allow = c 239:* rwm

    # Pass through device files
    lxc.mount.entry = /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
    lxc.mount.entry = /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
    lxc.mount.entry = /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file
    lxc.mount.entry = /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
    lxc.mount.entry = /dev/nvidia1 dev/nvidia1 none bind,optional,create=file
    lxc.mount.entry = /dev/nvidiactl dev/nvidiactl none bind,optional,create=file

     

     

    afterwards running nvidia-smi in the container works.

     

    However, when i try to spin a docker container using GPU i get this error:

     ⠹ Container jellyfin  Starting                                                                                                                         0.2s
    Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: container error: failed to get device cgroup mount path: no cgroup filesystem mounted for the devices subsytem in mountinfo file: unknown

     ⠹ Container jellyfin  Starting                                                                                                                         0.2s
    Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: container error: failed to get device cgroup mount path: no cgroup filesystem mounted for the devices subsytem in mountinfo file: unknown

     

     

    I've tried several "recommendations" from the web including  this to no avail.

     

    This is the sample debian bullseye container.

     

    I've also been unable to create a more recent stable ubuntu container.

     

    This command creates the container but it doesnt start

     

    lxc-create --name docker --template download -- --dist ubuntu --release jammy --arch amd64

     

    Attempting to start it from cli doesnt show any errors.

     

    The only other that has worked is the impish release

  4. 2 hours ago, ich777 said:

    Maybe a dumb question, but have you installed a cache drive and on what Unraid version are you?
     

    Have you yet tried to install a container from the terminal?

     

    You‘ll find how to do that in the LXC tab and after that click on Guide.

     

     

    Yes, the cache in /mnt/cache is in my cache pool devices

    I run unraid 6.10.2

     

    I just tried via terminal and got this:

     

    root@Unraid:/mnt/cache# lxc-create --name Debian --template download -- --dist debian --release bullseye --arch amd64
    Downloading the image index
    Downloading the rootfs
    Downloading the metadata
    mkdir: cannot create directory ‘//var/cache/lxc’: File exists
    lxc-create: Debian: lxccontainer.c: create_run_template: 1627 Failed to create container from template
    lxc-create: Debian: tools/lxc_create.c: main: 317 Failed to create container Debian

     

    i checked /var/cache/lxc and got this:

     

    root@Unraid:/var/cache# ls
    cracklib/  ldconfig/  libvirt/  lxc@  samba/

     

     

    I removed lxc@ (it said it had an invalid link)

     

    Attempted creating again from GUI and now no error

     

    And it works. container is running!!

     

    Thank you

     

    • Like 1
  5. Good day, I now have similar error 

    Warning: stream_socket_client(): unable to connect to unix:///var/run/docker.sock (Connection refused) in /usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php on line 693
    Couldn't create socket: [111] Connection refused
    Warning: Invalid argument supplied for foreach() in /usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php on line 877

     

    For a while now it's been doing this after a restart, I would then turn off docker then turn it on and it would start

     

    Now it will not start. I've restarted the server, turned docker off/on.  

     

    During start I noticed it says it cant reach some "udp" network.

     

    Any help guidance is much appreciated.

     

    Thank you

    tower-diagnostics-20211221-0136.zip

  6. On 10/3/2021 at 11:22 PM, primeval_god said:

    Compose Manager

    Beta Release!

    This plugin installs docker compose 2.0.1 and compose switch 1.0.2.

    Use "docker compose" or "docker-compose" from the command line.

    See https://docs.docker.com/compose/cli-command/ for additional details.

    Install via Community Applications

     

    Future Work:

    A simple unRAID web-gui integration is in the works.

    @primeval_god

    Thank you for producing this plugin. Works fine for me; new compose is significantly faster and just better.

     

    Despite the Switch, there are some changes to the yaml format that need modification. For instance gpu pass through; however, it's all in the excellent documentation.

  7. This is what I did with "user scripts"

    1. Created as script, that's simply a place holder for the docker compose binary. In my example it's called "06_docker_compose_binary". Just create it in the web ui. Add nothing.
    2.  A script that downloads the docker-compose binary, once a month, into the place holder script created in step one:
    #!/bin/bash
    #----------------------------------------------------------------------------
    # This script will update docker-compose script from github periodically    |
    #----------------------------------------------------------------------------
    
    COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
    curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /boot/config/plugins/user.scripts/scripts/06_docker_compose_binary/script

     

    3. Add to /boot/config/go file:

     

    # COPYING DOCKER-COMPOSE ##########
    cp /boot/config/plugins/user.scripts/scripts/06_docker_compose_binary/script /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    ###################################

     

    That's it!

    It's updated regularly and doesnt need internet on server start.

     

    Hope it helps.

     

     

     

     

     

     

     

     

     

    • Thanks 1
  8. If you are unable to build your own image and install the plugins via command line, my suggestion would be that you try something else.

    The shinobi Gui plugin manager doesn't work and in fact the plugins themselves work partially.

     

    Take a look at Frigate; it's actively developed and what it currently does it does very well.

     

    Alternatively go with zoneminder. 

  9. I'm on this bios: American Megatrends Inc. Version 5843. Dated: 03/11/2021

     

    and have the following:

    • 1st slot Radeon RX 570 which I use for MacOs and Windows VMs
    • 2nd slot GeForce GTX 1650 for Archlinux Vm - daily driver
    • 3rd slot GeForce GTX 1050 Ti - hardware acceleration. i.e plex, zoneminder, mlapi, etc.

     

    I'm on Legacy boot. non uefi. In bios I've only modified the following:

     

    • HVM: Enabled
    • IOMMU: Enabled
    • Memory Freq: 3000
    • Power state: Power on restart
    • Fans: all at max

     

    I think that if you're passing the only GPU you have, you need to add the GPU bios in the vm. 

     

     

×
×
  • Create New...