Skip to content

Commit

Permalink
minor-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunyogeshwaran committed Dec 9, 2024
1 parent 3fccd65 commit e827534
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions air-gapped_installations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ This guide walks you through the installation process of Custom Recipes in an ai
## Prerequisite
- Two DAI installations are required: one on an **Air-Gapped Machine** and the other on an **Internet-Facing Machine**. These terms will be used throughout the document for clarity.
- First, install DAI on the air-gapped machine (a machine isolated from the Internet). DAI can be installed using any available package type (e.g., TAR SH, Docker, DEB). You can download the installation packages from [H2O.ai Downloads](https://h2o.ai/resources/download/).
- On the Internet-facing machine, clone the repository and check out the appropriate branch for your DAI `VERSION`
```
- On the Internet-facing machine, clone the repository and check out the appropriate branch for your DAI `VERSION`:
```
git clone https://github.com/h2oai/driverlessai-recipes.git
cd driverlessai-recipes
git checkout rel-VERSION # eg. git checkout rel-1.9.0 for DAI 1.9.0
```
```

## Installation Guide
Follow the steps below to use custom recipes for DAI in an air-gapped environment:
Expand All @@ -22,19 +22,19 @@ Follow the steps below to use custom recipes for DAI in an air-gapped environmen
1. Download the required version of the Driverless AI TAR SH installer on the Internet-Facing Machine from [H2O.ai Downloads](https://www.h2o.ai/download/).

2. Run the following commands to install the Driverless AI TAR SH. Replace `VERSION` with the specific version you need.
```
```
chmod 755 dai-VERSION.sh
./dai-VERSION.sh
```
```
3. Next, `cd` to the unpacked directory:
```
```
cd dai-VERSION
```
```
4. Copy the `load_custom_recipe.py` script from `driverlessai-recipes/air-gapped_installations` to `dai-VERSION`.
5. Run the following Python script, either in one of the following ways:
5. Run the following Python script, in either one of the following ways:
- **To load custom recipes from a local file:**
```
Expand All @@ -43,31 +43,31 @@ Follow the steps below to use custom recipes for DAI in an air-gapped environmen
- `<user>`: The username (e.g., `jon`).
- `</absolute/path/to/the/custom_recipe/file.py>`: The path to the recipe you want to upload to DAI.
For example, to load the [daal_trees recipe](https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/daal_trees.py) from the cloned `driverlessai-recipes` repo:
```
./dai-env.sh python load_custom_recipe.py -username jon -p /home/ubuntu/driverlessai-recipes/models/algorithms/daal_trees.py >> load_custom_recipe.log
```
For example, to load the [daal_trees recipe](https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/daal_trees.py) from the cloned `driverlessai-recipes` repo:
```
./dai-env.sh python load_custom_recipe.py -username jon -p /home/ubuntu/driverlessai-recipes/models/algorithms/daal_trees.py >> load_custom_recipe.log
```
- **To load custom recipes from a URL:**
```
./dai-env.sh python load_custom_recipe.py -username <user> -u <URL> >> load_custom_recipe.logg
```
- `<URL>`: The URL to the custom recipe.
For example, to load the [catboost recipe](https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/catboost.py) from a URL:
```
./dai-env.sh python load_custom_recipe.py -username jon -u https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/catboost.py >> load_custom_recipe.log
```
For example, to load the [catboost recipe](https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/catboost.py) from a URL:
```
./dai-env.sh python load_custom_recipe.py -username jon -u https://github.com/h2oai/driverlessai-recipes/blob/rel-1.8.8/models/algorithms/catboost.py >> load_custom_recipe.log
```
**Note:** *You can check the `load_custom_recipe.log` file to verify if the operation was successful.*
6.Once the script has been executed successfully, custom recipes and Python dependencies will be installed in the `dai-VERSION/<data_directory>/<user>/contrib` directory, where `<data_directory>` is `tmp` by default.
6. Once the script has been executed successfully, custom recipes and Python dependencies will be installed in the `dai-VERSION/<data_directory>/<user>/contrib` directory, where `<data_directory>` is `tmp` by default.
7. Zip the `dai-VERSION/tmp/contrib` directory and move it to the air-gapped machine. Unzip it into the DAI `tmp` directory:
```
```
cd dai-VERSION/`<data_directory>`/
zip -r user_contrib.zip `<user>`/contrib
scp user_contrib.zip `<remote_user>`@`<remote_system>`:`<path to data_directory on remote system>`
```
```
8. Now, on the **Air-Gapped Machine**, unzip the file and set permissions if necessary:
```
Expand Down

0 comments on commit e827534

Please sign in to comment.