Skip to content

Commit ac9043d

Browse files
Tim Lanetilne
authored andcommitted
Dynamically set architecture-specific paths
1 parent 5f54622 commit ac9043d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/common/sge.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
1111
# See the License for the specific language governing permissions and limitations under the License.
1212

13+
import platform
14+
1315
from common.utils import check_command_output, run_command
1416

1517
SGE_ROOT = "/opt/sge"
16-
SGE_BIN_PATH = SGE_ROOT + "/bin/lx-amd64"
18+
BIN_PATH_SUFFIX = "amd64" if platform.machine() == "x86_64" else "arm64"
19+
SGE_BIN_PATH = SGE_ROOT + "/bin/lx-" + BIN_PATH_SUFFIX
1720
SGE_BIN_DIR = SGE_BIN_PATH + "/"
1821
SGE_ENV = {"SGE_ROOT": SGE_ROOT, "PATH": "{0}/bin:{1}:/bin:/usr/bin".format(SGE_ROOT, SGE_BIN_PATH)}
1922

0 commit comments

Comments
 (0)