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

Dockerfile no longer builds a docker image #4432

Open
shortcipher3 opened this issue Apr 3, 2024 · 5 comments
Open

Dockerfile no longer builds a docker image #4432

shortcipher3 opened this issue Apr 3, 2024 · 5 comments

Comments

@shortcipher3
Copy link
Contributor

Issue Description

The Dockerfile found here fails to build, even when following the instructions in the README.md

Expected Result

Docker image should be built.

How to Reproduce

  1. docker build .

Further Information

Here is some of my output from running:

Step 16/39 : RUN mk-build-deps debian/control
 ---> Running in 4fb0374fc43b
Use of uninitialized value $fullname in concatenation (.) or string at /usr/bin/equivs-build line 223.
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'nnstreamer-build-deps' in '../nnstreamer-build-deps_2.4.1.0_amd64.deb'.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
Removing intermediate container 4fb0374fc43b
 ---> 479338009cc9
Step 17/39 : USER root
 ---> Running in 12c041448be8
Removing intermediate container 12c041448be8
 ---> e00d28c668b7
Step 18/39 : RUN apt-get -f install ./nnstreamer-build-deps*.deb &&     rm -f ./nnstreamer-build-deps*.deb &&     rm -rf /var/lib/apt/lists/*
 ---> Running in 747ee897bd4f
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nnstreamer-build-deps : Depends: libflatbuffers-dev but it is not going to be installed
                         Depends: tensorflow2-lite-dev but it is not going to be installed
                         Depends: onnxruntime-dev but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/bash -c apt-get -f install ./nnstreamer-build-deps*.deb &&     rm -f ./nnstreamer-build-deps*.deb &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
@taos-ci
Copy link
Collaborator

taos-ci commented Apr 3, 2024

:octocat: cibot: Thank you for posting issue #4432. The person in charge will reply soon.

@shortcipher3
Copy link
Contributor Author

I also tried with a newer version of ubuntu than the default:

$ sudo docker build -t nns --build-arg="UBUNTU_VER=22.04" .

The output was something like this:

Setting up python3-apt (2.4.0ubuntu3) ...
Setting up python3-lazr.uri (1.0.6-2) ...
Setting up python3-zipp (1.0.0-3) ...
Setting up python3-cryptography (3.4.8-1ubuntu2.2) ...
Setting up python3-wadllib (1.3.6-1) ...
Setting up packagekit (1.2.5-2ubuntu2) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of force-reload.
Failed to open connection to "system" message bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Created symlink /etc/systemd/user/sockets.target.wants/pk-debconf-helper.socket → /usr/lib/systemd/user/pk-debconf-helper.socket.
Setting up python3-importlib-metadata (4.6.4-1) ...
Setting up python3-oauthlib (3.2.0-1ubuntu0.1) ...
Setting up python3-secretstorage (3.3.1-1) ...
Setting up python3-keyring (23.5.0-1) ...
Setting up python3-lazr.restfulclient (0.14.4-1) ...
Setting up python3-launchpadlib (1.10.16-1) ...                                                                                                                                                                                                      Setting up python3-software-properties (0.99.22.9) ...
Setting up software-properties-common (0.99.22.9) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Processing triggers for ca-certificates (20230311ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
+ add-apt-repository ppa:nnstreamer/ppa -u
gpg: error running '/usr/bin/gpg-agent': probably not installed
gpg: failed to start agent '/usr/bin/gpg-agent': Configuration error
gpg: can't connect to the agent: Configuration error
Traceback (most recent call last):                                                                                                                                                                                                                     File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 423, in add_key
Repository: 'deb https://ppa.launchpadcontent.net/nnstreamer/ppa/ubuntu/ jammy main'                                                                                                                                                                 Description:                                                                                                                                                                                                                                         package archive for nnstreamer                                                                                                                                                                                                                       More info: https://launchpad.net/~nnstreamer/+archive/ubuntu/ppa
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/nnstreamer-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/nnstreamer-ubuntu-ppa-jammy.list
Adding key to /etc/apt/trusted.gpg.d/nnstreamer-ubuntu-ppa.gpg with fingerprint 373A37D40E480F96524A4027CADA0F77901522B3
    subprocess.run(cmd.split(), check=True, input=keys)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['gpg', '-q', '--no-options', '--no-default-keyring', '--batch', '--keyring', '/etc/apt/trusted.gpg.d/nnstreamer-ubuntu-ppa.gpg', '--homedir', '/tmp/tmptvcvg33r', '--import']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 364, in <module>
    sys.exit(0 if addaptrepo.main() else 1)
  File "/usr/bin/add-apt-repository", line 357, in main
    shortcut.add()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 222, in add
    self.add_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 425, in add_key
    raise ShortcutException(e)
softwareproperties.shortcuthandler.ShortcutException: Command '['gpg', '-q', '--no-options', '--no-default-keyring', '--batch', '--keyring', '/etc/apt/trusted.gpg.d/nnstreamer-ubuntu-ppa.gpg', '--homedir', '/tmp/tmptvcvg33r', '--import']' returned non-zero exit status 2.
The command '/bin/sh -c set -x &&     echo "debconf debconf/frontend select ${DEBIAN_FRONTEND}" | debconf-set-selections &&     echo 'APT::Install-Recommends "false";' | tee /etc/apt/apt.conf.d/99install-recommends &&     echo 'APT::Get::Assume-Yes "true";' | tee /etc/apt/apt.conf.d/99assume-yes &&     sed -Ei 's|^(DPkg::Pre-Install-Pkgs .*)|#\1|g' /etc/apt/apt.conf.d/70debconf &&     apt-get update &&     apt-get install software-properties-common &&     add-apt-repository ppa:nnstreamer/ppa -u &&     add-apt-repository ppa:one-runtime/ppa -u &&     apt-get install         git         build-essential         pkg-config         cmake         ninja-build         flex         bison         meson         equivs         devscripts &&     useradd -ms /bin/bash ${USERNAME}' returned a non-zero code: 1

@myungjoo
Copy link
Member

Does it work with --build-arg="UBUNTU_VER=22.04" and adding gpg-agent in LINE 22?
(My dev machine is out of "docker" for the moment... I'm doing dist-upgrade to access newer docker. My older docker gives me "missing signature key" for any docker build.)

@shortcipher3
Copy link
Contributor Author

I made that change and the build now shows this error:

+ add-apt-repository ppa:nnstreamer/ppa -u
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 364, in <module>
Repository: 'deb https://ppa.launchpadcontent.net/nnstreamer/ppa/ubuntu/ jammy main'
Description:
package archive for nnstreamer
More info: https://launchpad.net/~nnstreamer/+archive/ubuntu/ppa
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/nnstreamer-ubuntu-ppa-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/nnstreamer-ubuntu-ppa-jammy.list
    sys.exit(0 if addaptrepo.main() else 1)
  File "/usr/bin/add-apt-repository", line 357, in main
    shortcut.add()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 222, in add
    self.add_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/shortcuthandler.py", line 398, in add_key
    if not all((self.trustedparts_file, self.trustedparts_content)):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 141, in trustedparts_content
    key = self.lpppa.getSigningKeyData()
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 592, in __call__
    response, content = self.root._browser._request(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 429, in _request
    raise error
lazr.restfulclient.errors.ServerError: HTTP Error 500: Internal Server Error
Response headers:
---
connection: close
content-length: 9
content-type: text/plain;charset=utf-8
date: Thu, 18 Apr 2024 17:44:45 GMT
server: gunicorn
status: 500
x-lazr-oopsid: OOPS-4c69269818132411c1b35409d111ae14
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-request-id: eabed6d8-b8aa-449d-9e4f-d23b690cf644
x-vcs-revision: 67d34a19aaa1df7be4dd8bf498cbc5bbd785067b
---
Response body:
---
b'HTTPError'
---

I then navigated to the url in a browser:
https://ppa.launchpad.net/nnstreamer/ppa/ubuntu/

I got that the ssl cert was expired and the site is insecure. I assume that is why it still fails.

@myungjoo
Copy link
Member

At my machine, replacing 18.04 --> 22.04 and adding gpg-agent make it passes through add-apt-repository. (running the stage of apt-get install git build-essential pkg-config cmake ninja-build flex bison meson equivs devscripts).

I'll add PR when the test is done

I guess the ssl cert is not the issue here although ppa.launchpad.net has invalid ssl cert, which is not a problem limited to ppa/nnstreamer.

myungjoo added a commit to myungjoo/nnstreamer that referenced this issue Apr 19, 2024
1. Update 18.04 --> 22.04
2. Add gpg-agent to resolve docker build error in 22.04
3. Add mirror ARG for faster usage
    - e.g., w/ --build-arg="UBUNTU_APT_MIRROR=http://mirror.kakao.com/ubuntu/"

Addresses nnstreamer#4432

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
myungjoo added a commit that referenced this issue Apr 23, 2024
1. Update 18.04 --> 22.04
2. Add gpg-agent to resolve docker build error in 22.04
3. Add mirror ARG for faster usage
    - e.g., w/ --build-arg="UBUNTU_APT_MIRROR=http://mirror.kakao.com/ubuntu/"

Addresses #4432

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants