Skip to content

Commit 45cafcd

Browse files
wendell-homwhom3
andauthored
Install Haply Inverse Service (#156)
Update env_setup_telesurgery.sh to install the Haply Inverse Service Co-authored-by: Wendell Hom <whom@nvidia.com>
1 parent 612cb7a commit 45cafcd

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

tools/env_setup/install_haply.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
set -e
19+
20+
VERSION=3.3.2
21+
PLATFORM=amd64
22+
OS_VERSION=$(lsb_release -rs)
23+
24+
# ---- Install Haply Inverse Service
25+
if command -v "haply-inverse-service" &> /dev/null; then
26+
echo "Haply Inverse Service already installed, skipping."
27+
exit 0
28+
fi
29+
30+
if [[ "$(uname -m)" != x86_64 ]]; then
31+
echo "Skipping for non-x86_64 arch."
32+
exit 1
33+
fi
34+
35+
# Download the deb package
36+
if [[ "$OS_VERSION" == "24.04" ]]; then
37+
echo "Detected Ubuntu 24.04"
38+
wget -O haply-inverse-service.deb https://cdn.haply.co/r/38736259/haply-inverse-service_3.3.2_amd64.deb
39+
elif [[ "$OS_VERSION" == "22.04" ]]; then
40+
echo "Detected Ubuntu 22.04"
41+
wget -O haply-inverse-service.deb https://cdn.haply.co/r/38736259/haply-inverse-service_3.3.2_2204_amd64.deb
42+
else
43+
echo "Unsupported version of Ubuntu: $OS_VERSION"
44+
exit 1
45+
fi
46+
47+
48+
# Install debian
49+
sudo apt-get install -y ./haply-inverse-service.deb
50+
rm haply-inverse-service.deb
51+
52+
echo "Haply Inverse Service installed!"

tools/env_setup_telesurgery.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ echo "Installing necessary dependencies..."
5454
pip install numpy
5555
conda install -c conda-forge libstdcxx-ng -y
5656

57+
# ---- Install Haply Inverse Service (Telesurgery) ----
58+
if [[ "$(uname -m)" == x86_64 ]]; then
59+
echo "Installing Haply Inverse Service... (only for x86)"
60+
bash $PROJECT_ROOT/tools/env_setup/install_haply.sh
61+
else
62+
echo "Platform is not x86_64; Skip Haply Inverse Service Installation"
63+
fi
64+
65+
5766
# ---- Install necessary dependencies (Telesurgery) ----
5867
echo "Installing necessary dependencies..."
5968
pip install -r $PROJECT_ROOT/workflows/telesurgery/requirements.txt

0 commit comments

Comments
 (0)