Skip to content

Commit

Permalink
added build.sh (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhritinaidu authored Jul 19, 2024
1 parent 96b20c8 commit efe23e3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
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"
}

0 comments on commit efe23e3

Please sign in to comment.