我们正在使用Ubuntu 16.04对于我们的 Java 应用程序的打包折断.我们在第三方 SDK 的帮助下开发了一个用于人脸识别的 Java 应用程序。该应用程序需要第三方 SDK 的许可证才能运行。许可证应作为已安装机器中的单独实例运行。
在使用 snap 将我们的应用程序与依赖项和许可证一起打包后,我们的 Java 应用程序没有检测到正在运行的许可证实例。
许可证文件将通过 SDK 提供的 shell 脚本运行,并在端口上本地运行5000。
在打包应用程序时我们是否应该遵循任何其他步骤,特别是针对这种类型的许可?
我已将 snapcraft.yaml 文件附加到下方
name: facecheck # you probably want to 'snapcraft register <name>'
base: core18 # the base snap is the execution environment for this snap
version: '1.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Face recognition # 79 char long summary
description: |
This application is used to recognise and detect the persons face
with the enrolled data from database.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
facecheck:
command: usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar $SNAP/Bin/Java/simple-surveillance-application.jar
environment:
JAVA_HOME: $SNAP/usr/lib/jvm/java-1.8.0-openjdk-amd64
PATH: $JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
LD_LIBRARY_PATH: $SNAP/Lib/Linux_x86_64
plugs: [desktop, home, camera, x11, desktop-legacy, opengl, alsa, pulseaudio, network-bind]
autostart: Facecheck-surveillance.desktop
parts:
facecheck:
source: .
plugin: dump
build-packages:
- nvidia-384-dev
- libgtk-3-dev
- gstreamer1.0-vaapi
- vainfo
- openjdk-8-jre
- openjdk-8-demo
- libgdk-pixbuf2.0-dev
- alsa-utils
- libasound2-data
- libasound2-plugins
- libasound2
- libopus-dev
- libortp-dev
- gcc
- g++
- make
- libgudev-1.0-0
- libgudev-1.0-dev
- libgstreamer1.0-0
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-ugly
- gstreamer1.0-libav
- gstreamer1.0-doc
- gstreamer1.0-tools
- gstreamer1.0-x
- gstreamer1.0-alsa
- gstreamer1.0-gl
- gstreamer1.0-gtk3
- gstreamer1.0-qt5
- gstreamer1.0-pulseaudio
- libfontconfig1-dev
- libfreetype6-dev
- libpng-dev
- libcairo2-dev
- libjpeg-dev
- libgif-dev
- libgstreamer-plugins-base1.0-dev
- python-gst-1.0
- python3-gst-1.0
- postgresql
- postgresql-contrib
- odbc-postgresql
- unixodbc
- unixodbc-dev
- build-essential
- manpages-dev
stage-packages:
- libgpm2
- libslang2
- libnvidia-compute-390
- openjdk-8-jre
- openjdk-8-demo
- nvidia-384-dev
- libgtk-3-dev
- gstreamer1.0-vaapi
- vainfo
- libgdk-pixbuf2.0-dev
- alsa-utils
- libasound2-data
- libasound2
- libasound2-plugins
- gcc
- g++
- make
- libgudev-1.0-0
- libgudev-1.0-dev
- libgstreamer1.0-0
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-ugly
- gstreamer1.0-libav
- gstreamer1.0-doc
- gstreamer1.0-tools
- gstreamer1.0-x
- gstreamer1.0-alsa
- gstreamer1.0-gl
- gstreamer1.0-gtk3
- gstreamer1.0-qt5
- gstreamer1.0-pulseaudio
- libfontconfig1-dev
- libfreetype6-dev
- libpng-dev
- libcairo2-dev
- libjpeg-dev
- libgif-dev
- libgstreamer-plugins-base1.0-dev
- python-gst-1.0
- python3-gst-1.0
- postgresql
- postgresql-contrib
- odbc-postgresql
- unixodbc
- unixodbc-dev
- build-essential
- manpages-dev
答案1
您缺少network
接口,因此将其添加到plugs