Git Product home page Git Product logo

Comments (7)

fedario avatar fedario commented on July 30, 2024 3

The problem is that the installation script makes some assumptions about the system that are problematic. Namely:

line 214: sudo chown "${USER}" -R "${installation_folder}"
line 341: sudo cp -r "${folder}/99-slabs.rules" "/etc/udev/rules.d/"
line 343: sudo udevadm control --reload-rules && sudo udevadm trigger

Those lines are in the linux_install_release.sh file which is inside the .run file.

If you are trying to install the run file on a system where the $USER variable is not defined you will not be able to install the SDK properly. The standard Ubuntu 16.04 docker image is one example where this won't work. The other lines have similar issues.

A workaround would be to set the $USER variable, create the /etc/udev/rules.d directory and install the udev package manually beforehand:
export USER=insert_user
sudo mkdir -p /etc/udev/rules.d/
sudo apt install udev

from zed-sdk.

darkdragon-001 avatar darkdragon-001 commented on July 30, 2024 3

I managed to get it running in a docker container.
Note that this does not install CUDA.

Some things should be improved in the install script though:

  • apt-get should be used in scripts instead of apt since it does not have a stable CLI interface.
  • --force-yes is deprecated and options starting with --allow should be used instead.

This is my Dockerfile:

FROM ubuntu:16.04

ENV USER=root
ENV TERM=xterm

RUN \
    echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
    apt-get update && apt-get install -y apt-transport-https apt-utils less lsb-release udev wget && \
    mkdir -p /etc/udev/rules.d/ && \
    cd /tmp/ && \
    wget -O ./ZED_SDK_Linux_Ubuntu_v2.4.run https://download.stereolabs.com/zedsdk/2.4/ubuntu && \
    chmod +x ./ZED_SDK_Linux_Ubuntu_v2.4.run && \
    ./ZED_SDK_Linux_Ubuntu_v2.4.run --noexec --keep --target zed && \
    rm -f ZED_SDK_Linux_Ubuntu_v2.4.run && \
    cd zed/ && \
    ./linux_install_release.sh silent && \
    rm -rf /var/lib/apt/lists/* && \
    cd / && \
    rm -rf /tmp/zed

from zed-sdk.

fedario avatar fedario commented on July 30, 2024 1

You can also do this:

# updating Ubuntu repository
RUN apt update

# apt package installation
RUN apt install -y sudo apt-utils udev build-essential cmake git libqt5xml5 libopencv-dev python-opencv wget curl unzip
RUN DEBIAN_FRONTEND=noninteractive apt install -y libqt5svg5 libqt5gui5 libqt5widgets5 libqt5opengl5 unixodbc-dev libsybdb5 libglew-dev ttf-mscorefonts-installer freeglut3-dev libpng12-dev libturbojpeg libjpeg-turbo8 curl libhidapi-dev libhidapi-libusb0

# fixes an issue in the ZED SDK installation below
RUN mkdir -p /etc/udev/rules.d/

# setting up a new user since the ZED SDK .run file doesn't work when run as root
RUN adduser --disabled-password --gecos '' appuser
RUN adduser appuser sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN usermod -a -G video appuser
USER appuser
ENV USER appuser

# ZED SDK installation
COPY ZED_SDK_Linux_Ubuntu16_v2.4.0.run /home/appuser
RUN sudo chmod +x /home/appuser/ZED_SDK_Linux_Ubuntu16_v2.4.0.run
RUN /home/appuser/ZED_SDK_Linux_Ubuntu16_v2.4.0.run -- silent

from zed-sdk.

WASCHMASCHINE avatar WASCHMASCHINE commented on July 30, 2024

Absolutely not a linux guy, but have you tried sudo for the initial command / run file?

from zed-sdk.

santonatos avatar santonatos commented on July 30, 2024

try running the coammand with 'sudo' before? like :
sudo ./ZED_SDK_Linux_Ubuntu16_v2.0.1.run

from zed-sdk.

darkdragon-001 avatar darkdragon-001 commented on July 30, 2024

I am running this inside the standard Ubuntu 16.04 docker image.

I can't successfully run the run scipt via

./ZED_SDK_Linux_Ubuntu16_v2.0.1.run

or

sudo ./ZED_SDK_Linux_Ubuntu16_v2.0.1.run

because it results in

Verifying archive integrity... All good.
Uncompressing 'ZED camera SDK by Stereolabs'  100%  
./ZED_SDK_Linux_Ubuntu16_v2.4.0.run: 1: eval: ./linux_install_release.sh: Permission denied

When I extract it manually via

./ZED_SDK_Linux_Ubuntu16_v2.4.0.run --noexec --keep --target zed && cd zed

I find the missing ./linux_install_release.sh. I can then continue with the method described by @fedario.

from zed-sdk.

willcbaker avatar willcbaker commented on July 30, 2024

seems the installer also defaults to a /usr/local but the permissions are still tied to the user; can we set group permissions to these files instead?

from zed-sdk.

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.