forked from modular/max
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·32 lines (26 loc) · 1.03 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
##===----------------------------------------------------------------------===##
# Copyright (c) 2025, Modular Inc. All rights reserved.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions:
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##===----------------------------------------------------------------------===##
# If anything goes wrong, stop running the script.
set -e
MODEL_DIR="../../models/yolo"
# Make sure we're running from inside the directory containing this file.
cd "$(dirname "$0")"
# If CONDA_PREFIX is set, install requirements
if [[ -n "$CONDA_PREFIX" ]]; then
python3 -m pip install -r requirements.txt
fi
# Download model
python3 download-model.py -o "$MODEL_DIR"
# Execute model
python3 segment.py