name: aiyy
base: core22
version: '0.1'
summary: CLI assistant for technical information
description: |
Get technical information on the command line with ease using AIY. Simply type in your question as the prompt and
receive a beautifully formatted and helpful response. This snap also has options for resetting the API key and
toggling warnings.
architectures:
- build-on: [amd64]
grade: devel
confinement: devmode
apps:
aiyy:
command: bin/aiy
parts:
aiyy-part:
plugin: python
source: ../.
python-packages:
- wheel
- pip
- openai==0.26.4
- python-dotenv==0.21.1
- rich==13.3.1
I’ve tried, python-requriements, I tried using setuptools with a setupscript, I’ve been at it 12 hours and trying different approaches. After my 50th failed build, I decided to come and ask for help. I just can not find enough examples and am fundamentally misunderstanding something.
I set up the bin/aiy as a script that runs the entrypoint as such “exec python3 “$SNAP/aiy.py” “$@””
I am not sure if I’m getting close, or am going down another incorrect path. When I tried to use requirements file, I didn’t know if it it was looking in directory of yaml or from base path of snap, so I tried both …/requirements.txt and requirements.txt and neither seemed to work correctly.
Code I’m trying to build: https://github.com/visioninit/aiy
Cannot pack snap file: Command '['snap', 'pack', '--filename', 'aiyy_0.1_amd64.snap', '--compression', 'xz', PosixPath('/build/aiyy/prime'), PosixPath('/build/aiyy')]' returned non-zero exit status 1. (container.go:215: in snap "aiyy": path "bin/aiy" does not exist
error: cannot pack "/build/aiyy/prime": snap is unusable due to missing files)
Full execution log: '/root/.cache/snapcraft/log/snapcraft-20230203-123218.062509.log'
Build failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 204, in run
self.build()
File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 188, in build
self.run_build_command(["snapcraft"], cwd=output_path, env=env)
File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 51, in run_build_command
return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 571, in run
subprocess.check_call(cmd, **kwargs)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-jammy-amd64', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-77219697", "build-request-timestamp": "2023-02-03T12:30:00Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/ef448bbdcb4fd48d3b448a1ecdd02c72/+build/2011544"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'SNAPCRAFT_BUILD_FOR=amd64', '--', '/bin/sh', '-c', 'cd /build/aiyy && linux64 snapcraft']' returned non-zero exit status 1.
Any help would be appreciated… Resources I’ve been looking into: [removed links because I’m new user] and others… any assistance would be appreciated