Skip to content

Commit efe23e3

Browse files
authored
added build.sh (#13)
1 parent 96b20c8 commit efe23e3

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
ocean-prefilter
22
*.swp
3+
module.tar.gz
4+
ocean-prefilter-appimage

build.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# check if Docker is installed
4+
if ! command -v docker &> /dev/null; then
5+
echo "Docker is not installed. Please install Docker and try again."
6+
exit 1
7+
fi
8+
9+
# check the architecture
10+
ARCH=$(uname -m)
11+
12+
# pull the Docker image and log in
13+
DOCKER_IMAGE="ghcr.io/viamrobotics/ocean-prefilter:$ARCH"
14+
15+
docker pull $DOCKER_IMAGE
16+
17+
if [ $? -ne 0 ]; then
18+
echo "Failed to pull Docker image: $DOCKER_IMAGE"
19+
exit 1
20+
fi
21+
22+
docker run --rm \
23+
-e ARCH_TAG=$ARCH \
24+
-v "$(pwd)":/workspace \
25+
-w /workspace \
26+
$DOCKER_IMAGE \
27+
/bin/bash -c "make ocean-prefilter && make ocean-prefilter-appimage && make module.tar.gz"
28+

meta.json

+4
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@
99
"model": "viam-labs:vision:ocean-prefilter"
1010
}
1111
],
12+
"build": {
13+
"build": "./build.sh",
14+
"arch": ["linux/arm64", "linux/amd64"]
15+
},
1216
"entrypoint": "ocean-prefilter-appimage"
1317
}

0 commit comments

Comments
 (0)