• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2#
3# Copyright © 2023 Apple Inc. All rights reserved.
4#
5# This source code is licensed under the BSD-style license found in the
6# LICENSE file in the root directory of this source tree.
7
8SCRIPT_DIR_PATH="$(
9    cd -- "$(dirname "$0")" >/dev/null 2>&1
10    pwd -P
11)"
12
13EXECUTORCH_ROOT_PATH=$(realpath "$SCRIPT_DIR_PATH/../../../../")
14COREML_DIR_PATH="$EXECUTORCH_ROOT_PATH/backends/apple/coreml"
15
16red=`tput setaf 1`
17green=`tput setaf 2`
18
19echo "${green}ExecuTorch: Installing inmemoryfs extension."
20pip install "$COREML_DIR_PATH/runtime/inmemoryfs"
21STATUS=$?
22if [ $STATUS -ne 0 ]; then
23    echo "${red}ExecuTorch: Failed to install inmemoryfs extension."
24    exit 1
25fi