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

RSDK:8017 - added build.sh #13

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
ocean-prefilter
*.swp
module.tar.gz
ocean-prefilter-appimage
28 changes: 28 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Docker is not installed. Please install Docker and try again."
exit 1
fi

# check the architecture
ARCH=$(uname -m)

# pull the Docker image and log in
DOCKER_IMAGE="ghcr.io/viamrobotics/ocean-prefilter:$ARCH"

docker pull $DOCKER_IMAGE

if [ $? -ne 0 ]; then
echo "Failed to pull Docker image: $DOCKER_IMAGE"
exit 1
fi

docker run --rm \
-e ARCH_TAG=$ARCH \
-v "$(pwd)":/workspace \
-w /workspace \
$DOCKER_IMAGE \
/bin/bash -c "make ocean-prefilter && make ocean-prefilter-appimage && make module.tar.gz"

4 changes: 4 additions & 0 deletions meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
"model": "viam-labs:vision:ocean-prefilter"
}
],
"build": {
"build": "./build.sh",
"arch": ["linux/arm64", "linux/amd64"]
},
"entrypoint": "ocean-prefilter-appimage"
}
Loading