0% found this document useful (0 votes)
47 views17 pages

Docker and NPM Build Errors in AI Project

Uploaded by

shauryapunj404
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views17 pages

Docker and NPM Build Errors in AI Project

Uploaded by

shauryapunj404
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Terminal 03

Last login: Fri Aug 29 22:49:40 on ttys007


shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % curl -s
[Link]
{"status":"ok","model":"v1.0","backend":"model"}%
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git clone
[Link]
cd SolarSage-AI
docker build -t solar-sage-api .
docker run -p 8000:8000 solar-sage-api
Cloning into 'SolarSage-AI'...
remote: Enumerating objects: 2406, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 2406 (delta 0), reused 0 (delta 0), pack-reused 2403 (from 2)
Receiving objects: 100% (2406/2406), 1.17 GiB | 5.88 MiB/s, done.
Resolving deltas: 100% (9/9), done.
Updating files: 100% (2963/2963), done.
[+] Building 0.0s (1/1) FINISHED
docker:colima
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 2B
0.0s
ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or
directory
docker: Error response from daemon: failed to set up container networking: driver failed
programming external connectivity on endpoint festive_kare
(89d07c1f4689babd990a634d76f77d5c0b579aceb1b02690213a9f4fd6bc5f98): Bind for
[Link]:8000 failed: port is already allocated
Run 'docker run --help' for more information
shauryapunj@Shauryas-MacBook-Air SolarSage-AI % cd ~/Desktop/Solar_Sage_AI_public
npm install --save-dev electron-builder
npm warn skipping integrity check for git dependency ssh://git@[Link]/electron/[Link]
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @npmcli/move-file@2.0.1: This functionality has been moved to
@npmcli/fs
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not
use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a
key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
added 310 packages, and audited 382 packages in 26s
64 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % npm run dist
> solar-sage-ai@1.0.0 dist
> electron-builder
• electron-builder version=26.0.12 os=24.6.0
• loaded configuration file=[Link] ("build" field)
• description is missed in the [Link]
appPackageFile=/Users/shauryapunj/Desktop/Solar_Sage_AI_public/[Link]
• author is missed in the [Link]
appPackageFile=/Users/shauryapunj/Desktop/Solar_Sage_AI_public/[Link]
• writing effective config file=dist/[Link]
• executing @electron/rebuild electronVersion=31.7.7 arch=arm64 buildFromSource=false
appDir=./
• installing native dependencies arch=arm64
• completed installing native dependencies
• packaging platform=darwin arch=arm64 electron=31.7.7 appOutDir=dist/mac-arm64
• downloading
url=[Link]
[Link] size=97 MB parts=8
• downloaded
url=[Link]
[Link] duration=15.2s
• asar usage is disabled — this is strongly not recommended solution=enable asar and use
asarUnpack to unpack files that must be externally available
(node:11240) [DEP0190] DeprecationWarning: Passing args to a child process with shell option
true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
• default Electron icon is used reason=application icon is not set
• asar usage is disabled — this is strongly not recommended solution=enable asar and use
asarUnpack to unpack files that must be externally available
• skipped macOS application code signing reason=cannot find valid "Developer ID Application"
identity or custom non-Apple code signing certificate, it could cause some undefined behaviour,
e.g. macOS localized description not visible, see [Link] allIdentities=
0 identities found
Valid identities only
0 valid identities found
• building target=DMG arch=arm64 file=dist/[Link]
• building target=macOS zip arch=arm64 file=dist/[Link]
• building block map blockMapFile=dist/[Link]
• building block map blockMapFile=dist/[Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
npm install
npm run dist # creates dist/[Link]
up to date, audited 382 packages in 1s
64 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
> solar-sage-ai@1.0.0 dist
> electron-builder # creates dist/[Link]
electron-builder build
Build
Commands:
electron-builder build Build [default]
electron-builder install-app-deps Install app deps
electron-builder node-gyp-rebuild Rebuild own native code
electron-builder publish Publish a list of artifacts
electron-builder create-self-signed-cert Create self-signed code signing cert
for Windows apps
electron-builder start Run application in a development
mode using electron-webpack
Building:
-m, -o, --mac, --macos Build for macOS, accepts target list (see
[Link] [array]
-l, --linux Build for Linux, accepts target list (see
[Link] [array]
-w, --win, --windows Build for Windows, accepts target list (see
[Link] [array]
--x64 Build for x64 [boolean]
--ia32 Build for ia32 [boolean]
--armv7l Build for armv7l [boolean]
--arm64 Build for arm64 [boolean]
--universal Build for universal [boolean]
--dir Build unpacked dir. Useful to test. [boolean]
--prepackaged, --pd The path to prepackaged app (to pack in a
distributable format)
--projectDir, --project The path to project directory. Defaults to
current working directory.
-c, --config The path to an electron-builder config. Defaults
to `[Link]` (or `json`, or `json5`,
or `js`, or `ts`), see [Link]
Publishing:
-p, --publish Publish artifacts, see [Link]
[choices: "onTag", "onTagOrDraft", "always", "never", undefined]
Other:
--help Show help [boolean]
--version Show version number [boolean]
Examples:
electron-builder -mwl build for macOS, Windows and Linux
electron-builder --linux deb [Link] build deb and [Link] for Linux
electron-builder --win --ia32 build for Windows ia32
electron-builder set [Link] property `foo` to
-[Link]=bar `bar`
electron-builder configure unicode options for NSIS
--[Link]=false
See [Link] for more documentation.
Unknown arguments: #, creates, dist/[Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % ls dist/
[Link]​ ​ ​ ​ mac-arm64​ ​ ​ ​ ​
[Link]
[Link]​ ​ ​ [Link]​ ​
[Link]
[Link]​ ​ ​ ​ ​ [Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % mkdir -p .github/workflows
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % name: Build Solar Sage App
on:
push:
tags:
- 'v*' # runs on version tags like v1.0.0
workflow_dispatch: # manual trigger
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup [Link]
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build Windows .exe
run: npm run dist:win
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: solar-sage-windows
path: dist/*.exe
zsh: command not found: name:
zsh: command not found: on:
zsh: command not found: push:
zsh: command not found: tags:
zsh: command not found: v*
zsh: command not found: workflow_dispatch:
zsh: command not found: jobs:
zsh: command not found: build:
zsh: command not found: runs-on:
zsh: command not found: steps:
zsh: command not found: name:
zsh: command not found: uses:
zsh: command not found: name:
zsh: command not found: uses:
zsh: command not found: with:
zsh: command not found: node-version:
zsh: command not found: name:
zsh: command not found: run:
zsh: command not found: name:
zsh: command not found: run:
zsh: command not found: name:
zsh: command not found: uses:
zsh: command not found: with:
zsh: command not found: name:
zsh: no matches found: dist/*.exe
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
mkdir -p .github/workflows
cat > .github/workflows/[Link] <<'YAML'
name: Build Solar Sage App
on:
push:
tags:
- 'v*' # runs on version tags like v1.0.0
workflow_dispatch: {} # manual trigger
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup [Link]
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Build Windows .exe
run: npm run dist:win
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: solar-sage-windows
path: dist/*.exe
YAML
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git add
.github/workflows/[Link]
git commit -m "CI: add Windows .exe build workflow"
git push
[main ba8673d] CI: add Windows .exe build workflow
1 file changed, 31 insertions(+)
create mode 100644 .github/workflows/[Link]
To [Link]
! [rejected] main -> main (fetch first)
error: failed to push some refs to '[Link]
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag v1.0.1
git push origin v1.0.1
Enumerating objects: 20, done.
Counting objects: 100% (20/20), done.
Delta compression using up to 8 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (14/14), 445.07 KiB | 37.09 MiB/s, done.
Total 14 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (5/5), completed with 4 local objects.
To [Link]
! [remote rejected] v1.0.1 -> v1.0.1 (refusing to allow a Personal Access Token to create or
update workflow `.github/workflows/[Link]` without `workflow` scope)
error: failed to push some refs to '[Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
git fetch origin
git pull --rebase origin main
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (3/3), 1.56 KiB | 319.00 KiB/s, done.
From [Link]
f733d2f..b105c98 main -> origin/main
error: cannot pull with rebase: You have unstaged changes.
error: Please commit or stash them.
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git pull --rebase origin main
git tag -f v1.0.1
git push origin v1.0.1 -f
error: cannot pull with rebase: You have unstaged changes.
error: Please commit or stash them.
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 714 bytes | 714.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To [Link]
! [remote rejected] v1.0.1 -> v1.0.1 (refusing to allow a Personal Access Token to create or
update workflow `.github/workflows/[Link]` without `workflow` scope)
error: failed to push some refs to '[Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
git add .
git stash
warning: adding embedded git repository: SolarSage-AI
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: ​ git submodule add <url> SolarSage-AI
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: ​ git rm --cached SolarSage-AI
hint:
hint: See "git help submodule" for more information.
hint: Disable this message with "git config set [Link] false"
Saved working directory and index state WIP on main: ba8673d CI: add Windows .exe build
workflow
warning: unable to rmdir 'SolarSage-AI': Directory not empty
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git pull --rebase origin main
From [Link]
* branch main -> FETCH_HEAD
Successfully rebased and updated refs/heads/main.
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git stash pop
On branch main
Your branch is ahead of 'origin/main' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
​ new file: Dockerfile
​ new file: SolarSage-AI
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
​ modified: [Link]
​ modified: [Link]
​ modified: [Link]
Dropped refs/stash@{0} (ba6ea32d4f75b1f80d79c0b6a7f01b91d622367b)
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git pull origin main
From [Link]
* branch main -> FETCH_HEAD
Already up to date.
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag v1.0.1
git push origin v1.0.1
fatal: tag 'v1.0.1' already exists
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 714 bytes | 714.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To [Link]
! [remote rejected] v1.0.1 -> v1.0.1 (refusing to allow a Personal Access Token to create or
update workflow `.github/workflows/[Link]` without `workflow` scope)
error: failed to push some refs to '[Link]
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag -d v1.0.1
git push origin :refs/tags/v1.0.1
Deleted tag 'v1.0.1' (was ba8673d)
To [Link]
- [deleted] v1.0.1
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git pull origin main
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 1), reused 3 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (5/5), 1.30 KiB | 332.00 KiB/s, done.
From [Link]
* branch main -> FETCH_HEAD
b105c98..84fa1cc main -> origin/main
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config [Link] false # merge
hint: git config [Link] true # rebase
hint: git config [Link] only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag v1.0.2
git push origin v1.0.2
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 722 bytes | 722.00 KiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To [Link]
* [new tag] v1.0.2 -> v1.0.2
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag v1.0.3
git push origin v1.0.3
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To [Link]
* [new tag] v1.0.3 -> v1.0.3
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % git tag v1.0.4
git push origin v1.0.4
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To [Link]
* [new tag] v1.0.4 -> v1.0.4
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public %
~/Desktop/Solar_Sage_AI_public/dist/
zsh: permission denied: /Users/shauryapunj/Desktop/Solar_Sage_AI_public/dist/
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public %
Terminal 02
Last login: Fri Aug 29 22:49:03 on ttys007
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % curl -s
[Link]
{"status":"ok","model":"v1.0","backend":"model"}%
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % brew install colima docker
==> Downloading [Link]
==> Downloading [Link]
==> Fetching downloads for: colima and docker
==> Downloading [Link]
#############################################################################
#############################################################################
# 100.0%
==> Downloading [Link]
#############################################################################
#############################################################################
# 100.0%
==> Fetching dependencies for colima: lima
==> Downloading [Link]
#############################################################################
#############################################################################
# 100.0%
==> Fetching lima
==> Downloading
[Link]
ad03bacb30edbeec3c75f9d62ecb707
#############################################################################
#############################################################################
# 100.0%
==> Fetching colima
==> Downloading
[Link]
901d52382c75996fec7a1ddaa5ecd177dca
#############################################################################
#############################################################################
# 100.0%
==> Fetching dependencies for docker: docker-completion
==> Downloading [Link]
#############################################################################
#############################################################################
# 100.0%
==> Fetching docker-completion
==> Downloading
[Link]
2e407de67672a5a3f5ae1a4f1cccc079e01cedfc40d4
#############################################################################
#############################################################################
# 100.0%
==> Fetching docker
==> Downloading
[Link]
cef119bb46d1a982d471cdf0f87db5ba5b
#############################################################################
#############################################################################
# 100.0%
==> Installing colima dependency: lima
==> Downloading [Link]
Already downloaded:
/Users/shauryapunj/Library/Caches/Homebrew/downloads/2e63dd49ea7c7cbbe10fd8387025835
8821dfc9619295e904d4183dfb8ca763a--lima-1.2.1.bottle_manifest.json

🍺
==> Pouring lima--1.2.1.arm64_sequoia.[Link]
/opt/homebrew/Cellar/lima/1.2.1: 104 files, 40.2MB
==> Pouring colima--0.8.4.arm64_sequoia.[Link]
==> Caveats
To start colima now and restart at login:
brew services start colima
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/colima/bin/colima start -f

🍺
==> Summary
/opt/homebrew/Cellar/colima/0.8.4: 11 files, 5.9MB
==> Running `brew cleanup colima`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Installing docker dependency: docker-completion
==> Downloading [Link]
Already downloaded:
/Users/shauryapunj/Library/Caches/Homebrew/downloads/d7ddef8ae986e3778f2e3f51d91dafe0
12b26241a920ad97d156aed6fa2c053e--docker-completion-28.3.3.bottle_manifest.json
==> Pouring [Link]
Warning: These files were overwritten during the `brew link` step:
/opt/homebrew/etc/bash_completion.d/docker
/opt/homebrew/share/fish/vendor_completions.d/[Link]
/opt/homebrew/share/zsh/site-functions/_docker
They have been backed up to: /Users/shauryapunj/Library/Caches/Homebrew/Backup

🍺
==> Summary
/opt/homebrew/Cellar/docker-completion/28.3.3: 10 files, 342.8KB
==> Pouring docker--28.3.3.arm64_sequoia.[Link]

🍺
==> docker cask is installed, skipping link.
/opt/homebrew/Cellar/docker/28.3.3: 13 files, 26.8MB
==> Running `brew cleanup docker`...
==> No outdated dependents to upgrade!
==> Caveats
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
==> colima
To start colima now and restart at login:
brew services start colima
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/colima/bin/colima start -f
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % colima start
INFO[0001] starting colima
INFO[0001] runtime: docker
INFO[0002] creating and starting ... context=vm
INFO[0002] downloading disk image ... context=vm
INFO[0075] provisioning ... context=docker

INFO[0076] starting ... context=docker


INFO[0077] done
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % docker --version
Docker version 28.3.3, build 980b856
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % docker --version
Docker version 28.3.3, build 980b856
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
docker build -t solar-sage-api:latest .
[+] Building 65.3s (13/13) FINISHED
docker:colima
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 561B
0.0s
=> [internal] load metadata for [Link]/library/python:3.12-slim
7.8s
=> [auth] library/python:pull token for [Link]
0.0s
=> [internal] load .dockerignore
0.0s
=> => transferring context: 2B
0.0s
=> [1/7] FROM
[Link]/library/python:3.12-slim@sha256:d67a7b66b989ad6b6d6b10d428dcc5e0bfc3e5f88906
e67d490c4d3daac57047 8.5s
=> => resolve
[Link]/library/python:3.12-slim@sha256:d67a7b66b989ad6b6d6b10d428dcc5e0bfc3e5f88906
e67d490c4d3daac57047 0.0s
=> => sha256:36d983c178a06f2be8270a47a21f02ba9618771919e20e0ba847592826b79c2a
249B / 249B 0.8s
=> => sha256:7b5dfa58994b71320b90f4e4e2ced96f1ae3f6468038e81cf1e27a0e5d7b3c8d
12.04MB / 12.04MB 5.0s
=> => sha256:3cd5add3ba3330f959ed1b27096bfb25e2f29a4cf327009d69855a903036f3af
1.27MB / 1.27MB 2.0s
=> => sha256:9a6263cdeaa5d408640880103ee36920ef814974ca8e2674412ad6460e8968c9
30.14MB / 30.14MB 7.7s
=> => extracting
sha256:9a6263cdeaa5d408640880103ee36920ef814974ca8e2674412ad6460e8968c9
0.5s
=> => extracting
sha256:3cd5add3ba3330f959ed1b27096bfb25e2f29a4cf327009d69855a903036f3af
0.0s
=> => extracting
sha256:7b5dfa58994b71320b90f4e4e2ced96f1ae3f6468038e81cf1e27a0e5d7b3c8d
0.2s
=> => extracting
sha256:36d983c178a06f2be8270a47a21f02ba9618771919e20e0ba847592826b79c2a
0.0s
=> [internal] load build context
0.2s
=> => transferring context: 44.77MB
0.2s
=> [2/7] WORKDIR /app
0.1s
=> [3/7] RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl &&
rm -rf /var/lib/apt/lists/* 16.8s
=> [4/7] COPY [Link] .
0.0s
=> [5/7] RUN pip install --no-cache-dir -r [Link]
23.4s
=> [6/7] COPY service ./service
0.2s
=> [7/7] RUN mkdir -p /app/uploads
0.1s
=> exporting to image
8.3s
=> => exporting layers
6.0s
=> => exporting manifest
sha256:863322a54ee9b74811879bf19c399a4a45b0fcb74a49cea98e2755f23c2364a9
0.0s
=> => exporting config
sha256:5d3d446303455eaaa9cc6b3a7eefa4c8e445a540bb976576a851d6a5f33686b7
0.0s
=> => exporting attestation manifest
sha256:7171f1689da4929b8f81363c5e6dc8a9f539c3f0fe136e0c8d9ed8d86c7e80ee
0.0s
=> => exporting manifest list
sha256:43aaf95fe83cf9c935516e4d590d950edd65b935448e14a40d932086e1b3d3db
0.0s
=> => naming to [Link]/library/solar-sage-api:latest
0.0s
=> => unpacking to [Link]/library/solar-sage-api:latest
2.3s
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % docker run --rm -p 8000:8000 \
-v "$(pwd)/uploads:/app/uploads" \
--name solar-sage-api \
solar-sage-api:latest
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on [Link] (Press CTRL+C to quit)
Terminal 01
Last login: Fri Aug 29 17:14:16 on ttys005
shauryapunj@Shauryas-MacBook-Air ~ % cd ~/Desktop/Solar_Sage_AI_public
cat > Dockerfile <<'EOF'
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# Needed for onnxruntime (OpenMP)
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl \
&& rm -rf /var/lib/apt/lists/*
COPY [Link] .
RUN pip install --no-cache-dir -r [Link]
# Copy only the API code + model
COPY service ./service
# Optional: make a place for uploads
RUN mkdir -p /app/uploads
EXPOSE 8000
CMD ["uvicorn","[Link]:app","--host","[Link]","--port","8000"]
EOF
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % docker build -t
solar-sage-api:latest .
zsh: command not found: docker
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % brew install --cask docker
==> Auto-updating Homebrew...
Adjust how often this is run with `$HOMEBREW_AUTO_UPDATE_SECS` or disable with
`$HOMEBREW_NO_AUTO_UPDATE=1`. Hide these hints with
`$HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> Auto-updated Homebrew!
Updated 1 tap (shivammathur/php).
You have 19 outdated formulae installed.
==> Downloading
[Link]
6dfbbde7ed39e72b3/Casks/d/[Link]
#############################################################################
#############################################################################
# 100.0%
==> Downloading [Link]
#############################################################################
#############################################################################
# 100.0%
==> Installing Cask docker-desktop
==> Moving App '[Link]' to '/Applications/[Link]'
==> Linking Bash Completion '[Link]-completion' to
'/opt/homebrew/etc/bash_completion.d/docker-compose'
==> Linking Bash Completion '[Link]-completion' to
'/opt/homebrew/etc/bash_completion.d/docker'
==> Linking Fish Completion '[Link]-completion' to
'/opt/homebrew/share/fish/vendor_completions.d/[Link]'
==> Linking Fish Completion '[Link]-completion' to
'/opt/homebrew/share/fish/vendor_completions.d/[Link]'
==> Linking Zsh Completion '[Link]-completion' to
'/opt/homebrew/share/zsh/site-functions/_docker-compose'
==> Linking Zsh Completion '[Link]-completion' to
'/opt/homebrew/share/zsh/site-functions/_docker'
==> Linking Binary 'docker-compose' to '/usr/local/cli-plugins/docker-compose'
Password:
==> Linking Binary 'hub-tool' to '/usr/local/bin/hub-tool'
==> Linking Binary 'kubectl' to '/usr/local/bin/[Link]'
==> Linking Binary 'docker' to '/usr/local/bin/docker'
==> Linking Binary 'docker-credential-desktop' to
'/usr/local/bin/docker-credential-desktop'
==> Linking Binary 'docker-credential-ecr-login' to
'/usr/local/bin/docker-credential-ecr-login'
==> Linking Binary 'docker-credential-osxkeychain' to

🍺
'/usr/local/bin/docker-credential-osxkeychain'
docker-desktop was successfully installed!
==> No outdated dependents to upgrade!
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % open -a Docker
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % docker --version
Docker version 28.3.3, build 980b856
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % cd
~/Desktop/Solar_Sage_AI_public
docker build -t solar-sage-api:latest .
[+] Building 59.0s (13/13) FINISHED
docker:desktop-linux
=> [internal] load build definition from Dockerfile
0.0s
=> => transferring dockerfile: 561B
0.0s
=> [internal] load metadata for [Link]/library/python:3.12-slim
7.6s
=> [auth] library/python:pull token for [Link]
0.0s
=> [internal] load .dockerignore
0.1s
=> => transferring context: 2B
0.0s
=> [1/7] FROM
[Link]/library/python:3.12-slim@sha256:d67a7b66b989ad6b6d6b10d428dcc5e0bfc3e5f88906
e67d490c4d3daac57047 8.2s
=> => resolve
[Link]/library/python:3.12-slim@sha256:d67a7b66b989ad6b6d6b10d428dcc5e0bfc3e5f88906
e67d490c4d3daac57047 0.0s
=> => sha256:36d983c178a06f2be8270a47a21f02ba9618771919e20e0ba847592826b79c2a
249B / 249B 0.8s
=> => sha256:7b5dfa58994b71320b90f4e4e2ced96f1ae3f6468038e81cf1e27a0e5d7b3c8d
12.04MB / 12.04MB 5.1s
=> => sha256:3cd5add3ba3330f959ed1b27096bfb25e2f29a4cf327009d69855a903036f3af
1.27MB / 1.27MB 1.5s
=> => sha256:9a6263cdeaa5d408640880103ee36920ef814974ca8e2674412ad6460e8968c9
30.14MB / 30.14MB 7.6s
=> => extracting
sha256:9a6263cdeaa5d408640880103ee36920ef814974ca8e2674412ad6460e8968c9
0.4s
=> => extracting
sha256:3cd5add3ba3330f959ed1b27096bfb25e2f29a4cf327009d69855a903036f3af
0.0s
=> => extracting
sha256:7b5dfa58994b71320b90f4e4e2ced96f1ae3f6468038e81cf1e27a0e5d7b3c8d
0.2s
=> => extracting
sha256:36d983c178a06f2be8270a47a21f02ba9618771919e20e0ba847592826b79c2a
0.0s
=> [internal] load build context
0.4s
=> => transferring context: 44.77MB
0.4s
=> [2/7] WORKDIR /app
0.1s
=> [3/7] RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl &&
rm -rf /var/lib/apt/lists/* 6.2s
=> [4/7] COPY [Link] .
0.0s
=> [5/7] RUN pip install --no-cache-dir -r [Link]
28.0s
=> [6/7] COPY service ./service
0.1s
=> [7/7] RUN mkdir -p /app/uploads
0.1s
=> exporting to image
8.5s
=> => exporting layers
6.4s
=> => exporting manifest
sha256:48d5d522acac5ec57711bcc6275322d16cff795df43e483ba5045087ca429fa2
0.0s
=> => exporting config
sha256:c10b4df0808a7e01a20b050c38d2523f35b3cf8cc33186a4e4c054290c71b5c0
0.0s
=> => exporting attestation manifest
sha256:dc1ae4320b873a9cbc3023f317000a43dfa9bf9af0fdb5ed78979269974a6d86
0.0s
=> => exporting manifest list
sha256:c003050912ce8aecee3a6a62bdc6bcd4a0c64414903e562d6159812f5bcf0a69
0.0s
=> => naming to [Link]/library/solar-sage-api:latest
0.0s
=> => unpacking to [Link]/library/solar-sage-api:latest
2.1s
shauryapunj@Shauryas-MacBook-Air Solar_Sage_AI_public % # stop any local uvicorn just in
case
pkill -f "uvicorn.*[Link]:app.*8000" || true
docker run --rm -p 8000:8000 \
-v "$(pwd)/uploads:/app/uploads" \
--name solar-sage-api \
solar-sage-api:latest
zsh: command not found: #
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on [Link] (Press CTRL+C to quit)
INFO: [Link]:34715 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:56849 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:52064 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:57195 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:55728 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:61967 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:44937 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:18330 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:28732 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:63617 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:27420 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:55432 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:32095 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:58896 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:47442 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:49329 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:48357 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:35102 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:47197 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:21081 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:65057 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:16699 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:29514 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:21539 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:57771 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:55786 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:47793 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:31066 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:39410 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:31542 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:30406 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:16213 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:58532 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:21617 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:58121 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:51101 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:19732 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:36726 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:31092 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:65125 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:35527 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:24010 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:60981 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:46393 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:18652 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:24764 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:50242 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:30023 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:56539 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:61785 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:27407 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:52237 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:50378 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:60034 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:45404 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:49230 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:37832 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:44019 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:20142 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:39762 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:61625 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:21556 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:57954 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:26388 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:42705 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:60017 - "GET /health HTTP/1.1" 200 OK
INFO: [Link]:50486 - "GET /health HTTP/1.1" 200 OK

Common questions

Powered by AI

Docker is advantageous for deploying the project because it provides a consistent environment independent of the host system, simplifying dependency management and application scaling. It ensures that all users, regardless of their local setups, can run the application in the same environment, reducing compatibility issues .

The initial 'command not found' errors for Docker were resolved by installing Docker using Homebrew with 'brew install --cask docker', and verifying with 'docker --version' which confirmed the installation. This installation process ensured that Docker was available in the system PATH, resolving any issues related to missing commands .

To resolve issues with Git push attempts, the solutions involved pulling remote changes with 'git pull --rebase origin main', deleting conflicting tags both locally and remotely, and ensuring the appropriate scope for Personal Access Tokens. These steps are effective because they integrate local and remote changes, clear conflicts due to duplicate tags, and ensure the user has the necessary permissions for workflow modifications .

The steps involved in setting up a CI workflow to build a Windows executable in the Solar Sage project include: 1) Checking out the repository using 'actions/checkout@v4'. 2) Setting up Node.js with version 18 using 'actions/setup-node@v4'. 3) Installing project dependencies through 'npm install'. 4) Building the Windows executable using 'npm run dist:win'. 5) Uploading the generated artifacts with 'actions/upload-artifact@v4' where the executable is located at 'dist/*.exe' .

Docker is used to containerize the Solar Sage project's application. The Docker setup involves creating a 'Dockerfile' based on 'python:3.12-slim', setting environment variables, copying the service code, installing dependencies via 'requirements.txt', and creating a directory for uploads. The image is built using 'docker build -t solar-sage-api:latest .' and run with 'docker run --rm -p 8000:8000' with volume mounting for uploads. Docker ensures the application can be reliably built and run across different environments .

Setting up a specific Node.js version ensures that the CI process uses a consistent environment for building and running the application. This consistency helps prevent issues related to version incompatibilities, as both the dependencies and the Node.js runtime are expected to work together without unexpected errors .

The common git issue referenced is when updates are rejected because the remote contains work not present locally, usually caused by another repository pushing to the same ref. It is typically resolved by first pulling remote changes with 'git pull' before attempting to push again to integrate the changes .

Tag management during deployment involves creating a new tag with the 'git tag' command and pushing it to the remote repository using 'git push origin <tag_name>'. An issue occurred when attempting to push tag 'v1.0.1'; the remote rejected it due to insufficient permissions for modifying the workflow file without the 'workflow' scope for Personal Access Tokens. To resolve the issue, the tag was deleted both locally and remotely using 'git tag -d v1.0.1' and 'git push origin :refs/tags/v1.0.1', respectively, and a new tag 'v1.0.2' was created and successfully pushed .

To set up a local server for the Solar Sage API, a Docker container is created and run using the command 'docker run --rm -p 8000:8000'. It's configured to mount the uploads directory and start with 'uvicorn' with the endpoint specified as 'service.app:app'. The server is tested by accessing the health check endpoint (e.g., '/health'), which returns a status response to confirm the application is running correctly .

The challenge with using embedded repositories is that clones of the outer repository will not contain their contents, nor will they know how to obtain them. Proposed workarounds include using 'git submodule add <url>' to add it as a submodule, or removing it from the index with 'git rm --cached <repo_name>' if it was added by mistake. These solutions streamline collaborative work and repository management .

You might also like