Skip to content

Commit

Permalink
Merge pull request #3 from industrial-edge/1537592-remove-conda
Browse files Browse the repository at this point in the history
Remove outdated content
  • Loading branch information
zsszaboo authored Nov 26, 2024
2 parents 4612bba + 9a937b0 commit 00f287c
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 195 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Tutorials for AI Software Development Kit

Known issues:

- Python 3.8.10 is the final regular bugfix release of Python 3.8 with binary installers. We recommend you to use the most recent bugfix release of Python 3.8 for productive use. You can build it from the sources or obtain it via conda if available. Please note that conda requires a license for business use. For non-productive use, you can attempt using AI SDK with Python 3.8.10.
- Python 3.8.10 is the final regular bugfix release of Python 3.8 with binary installers. We recommend you to use the most recent bugfix release of Python 3.8 for productive use. You can build it from the sources.
- The project templates have only been tested on 64-bit platforms. We do not recommend using them on 32-bit platforms.
- Python Package: Pillow ≤ 9.4.0 - Multiple Vulnerabilities
- As no TensorFlow Lite 2.7.0 installer was published for Windows systems, you cannot use the local pipeline runner on Windows to execute the TensorFlow Lite based pipeline packages, like the one provided in the Image Classification project template.
Expand Down
8 changes: 2 additions & 6 deletions e2e-tutorials/batch_state_identifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,11 @@ The following commands show how to set up such an environment.

```commandline
# You can choose your preferred Python environment manager to create the separated Python environment.
# We show examples for `conda` and `venv`.
# via conda
conda create -n state_identifier python=3.11.9
conda activate state_identifier
# We show examples for `venv`.
# via venv assuming Python 3.11.9 is installed on path {PYTHON_HOME_3.11.9}
{PYTHON_HOME_3.11.9}/bin/python -m venv {ENV_DIR}/state_identifier
{ENV_DIR}/state_identifier/Scripts/activate
{ENV_DIR}/state_identifier/bin/activate # on Windows, 'activate.bat' can be found in folder 'Scripts' instead of 'bin'
# Once the environment is created and activated you need to register as an ipykernel.
pip install ipykernel
Expand Down
19 changes: 0 additions & 19 deletions e2e-tutorials/batch_state_identifier/conda.yml

This file was deleted.

12 changes: 3 additions & 9 deletions e2e-tutorials/image_classification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,15 @@ We assume that Jupyter Lab or another notebook editor is already installed on yo
We recommend that you run the notebooks using the `image_classification` ipython kernel from the `image_classification` Python environment.

The following commands show how to set up such an environment on Linux.
If you are using Windows, please refer [WINDOWS_SETUP.md](docs/WINDOWS_SETUP.md).
If you are using Windows, please find the minor differences in the comments.

You can choose your preferred Python environment manager to create the separated Python environment.
We show examples for `conda` and `venv`.

```bash
# via conda
conda create -n image_classification python=3.11.9
conda activate image_classification
```
We show examples for `venv`.

```bash
# via venv assuming Python 3.11.9 is installed on path {PYTHON_HOME_3.11.9}
{PYTHON_HOME_3.11.9}/bin/python -m venv {ENV_DIR}/image_classification
{ENV_DIR}/image_classification/Scripts/activate
{ENV_DIR}/image_classification/bin/activate # on Windows, 'activate.bat' can be found in folder 'Scripts' instead of 'bin'

```

Expand Down
19 changes: 0 additions & 19 deletions e2e-tutorials/image_classification/conda.yml

This file was deleted.

12 changes: 3 additions & 9 deletions e2e-tutorials/object_detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,15 @@ We assume that Jupyter Lab or another notebook editor is already installed on yo
We recommend that you run the notebooks using the `object_detection` ipython kernel from the `object_detection` Python environment.

The following commands show how to set up such an environment on Linux.
If you are using Windows, please refer [WINDOWS_SETUP.md](docs/WINDOWS_SETUP.md).
If you are using Windows, please find the minor differences in the comments.

You can choose your preferred Python environment manager to create the separated Python environment.
We show examples for `conda` and `venv`.

```bash
# via conda
conda create -n object_detection python=3.11.9
conda activate object_detection
```
We show examples for `venv`.

```bash
# via venv assuming Python 3.11.9 is installed on path {PYTHON_HOME_3.11.9}
{PYTHON_HOME_3.11.9}/bin/python -m venv {ENV_DIR}/object_detection
{ENV_DIR}/object_detection/Scripts/activate
{ENV_DIR}/object_detection/bin/activate # on Windows, 'activate.bat' can be found in folder 'Scripts' instead of 'bin'

```

Expand Down
19 changes: 0 additions & 19 deletions e2e-tutorials/object_detection/conda.yml

This file was deleted.

12 changes: 3 additions & 9 deletions e2e-tutorials/state_identifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ _Hint: This readme is available both as HTML and Markdown. The HTML version you
We assume that Jupyter Notebooks or Jupyter Lab is already installed on your machine.
It is recommended that notebooks are run using the `state_identifier` ipython kernel from the `state_identifier` Python environment.
The following commands show how to set up such an environment on Linux.
If you are using Windows, please refer [WINDOWS_SETUP.md](docs/WINDOWS_SETUP.md).
If you are using Windows, please find the minor differences in the comments.

You can choose your preferred Python environment manager to create the separated Python environment.

We show examples for `conda` and `venv`.

```bash
# via conda
conda create -n state_identifier python=3.11.9
conda activate state_identifier
```
We show examples for `venv`.

```bash
# via venv assuming Python 3.11.9 is installed on path {PYTHON_HOME_3.11.9}
{PYTHON_HOME_3.11.9}/bin/python -m venv {ENV_DIR}/state_identifier
{ENV_DIR}/state_identifier/Scripts/activate
{ENV_DIR}/state_identifier/bin/activate # on Windows, 'activate.bat' can be found in folder 'Scripts' instead of 'bin'
```

Once the environment is created and activated you need to install required packages including AI SDK and ipykernel.
Expand Down
19 changes: 0 additions & 19 deletions e2e-tutorials/state_identifier/conda.yml

This file was deleted.

36 changes: 0 additions & 36 deletions howto-guides/00-setup-environment-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,10 @@ When using multiple project templates and notebook editors, we recommend using a
Below you can find instructions for setting up two environment managers:

- [Setting up an environment manager](#setting-up-an-environment-manager)
- [Setting up Conda](#setting-up-conda)
- [Setting up Python venv](#setting-up-python-venv)

You can choose any of the above environment managers or your preferred environment manager.

## Setting up Conda

If you choose to install Python using Conda you need a Conda edition installed on your machine. The following page provides guidance on choosing between the [editions of Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html).\

With Conda, you can select the Python version when you create a new environment. The rest of the section assumes setting up your conda environment using [Miniconda installer](https://docs.conda.io/en/latest/miniconda.html#linux-installers)

> ⚠️ **Warning**\
Conda is dual licenced with a commercial and a free licence.\
Please study the license terms of Conda to determine whether you can use it for free or need to pay a license fee.

After the installer is downloaded, start it using a bash shell.

```bash
bash "~/Downloads/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh"
```

After accepting the licence, the installer will ask for a destination folder. By default, it suggests

> /home/${USER}/miniconda3\
Press ENTER to confirm the location, or type in the desired folder path.

As the last step it will offer to put a conda setup script into your shell initializer script (`~/.bashrc`).

> Do you wish the installer to initialize Miniconda3
> by running conda init? [yes|no]
If you answer yes, conda will automatically activate the `base` environment when you start a new shell. This can be disabled while keeping the rest of the conda initializer script.

To disable the automatic activation of the base environment, run:

```bash
conda config --set auto_activate_base false
```

## Setting up Python venv

The builtin environment manager for Python requires the desired runtime version preinstalled on the system. You can invoke the environment creation and activation commands by explicitly specifying the path of the Python executable, or you can set up the most frequently used version as the system default.
Expand Down
21 changes: 7 additions & 14 deletions howto-guides/00-setup-environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,27 @@ SPDX-License-Identifier: MIT

# How to setup environment manager environments

You can use your preferred Python environment manager to create the Python environment. We show here the commands for `Conda` and Python `venv`, taking project template Image Classification as an example. For other project templates, you have to substitute the name `image_classification` as described in the template's README.
You can use your preferred Python environment manager to create the Python environment. We show here the commands Python `venv`, taking project template Image Classification as an example. For other project templates, you have to substitute the name `image_classification` as described in the template's README.

> **Note**\
> It is strongly recommended to create independent environments for project templates, and also for Jupyter Lab.
## Create Conda environment including Python and activate it

```dosbatch
conda create -n image_classification python=3.11.9
conda activate image_classification
```

## Create a Python virtual environment and activate it

This method requires a preinstalled Python 3.11 runtime.

```dosbatch
python -m venv %USERPROFILE%\venv\image_classification
%USERPROFILE%\venv\image_classification\Scripts\activate.bat
```bash
python -m venv ~/.venv/image_classification
. ~/.venv/image_classification/bin/activate
```

## Separate Jupyter Lab environment

We recommend creating an environment for installing and running Jupyter Lab, to avoid dependency version collisions with AI SDK.

```dosbatch
conda create -n jupyter_env python=3.11.9
conda activate jupyter_env
```bash
python -m venv ~/.venv/jupyter
. ~/.venv/jupyter/bin/activate
pip install jupyterlab
```

Expand Down
3 changes: 1 addition & 2 deletions howto-guides/00-setup-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ SPDX-License-Identifier: MIT

You will need a 64 bit Windows version to run AI SDK and the notebooks in the templates.

Before you begin, make sure that you have internet access. If you access the internet through a proxy, e.g. because you are working in a corporate network directly or via VPN, please make sure that you have configured `pip` and, if you plan to use it, `conda` to use the correct proxy. Setting the environment variables `http_proxy` and `https_proxy` covers both. A detailed explanation about alternative solutions is provided here:
Before you begin, make sure that you have internet access. If you access the internet through a proxy, e.g. because you are working in a corporate network directly or via VPN, please make sure that you have configured `pip` to use the correct proxy. Setting the environment variables `http_proxy` and `https_proxy` covers both. A detailed explanation about alternative solutions is provided here:

- https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server
- https://docs.anaconda.com/anaconda/user-guide/tasks/proxy/

If you have no `USERPROFILE` environment variable set, please set it so that it contains the path to a directory that belongs personally to you. You can check the variable by echoing it on Windows Command Prompt.

Expand Down
2 changes: 1 addition & 1 deletion howto-notebooks/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ As GPURuntime step of `AI Inference Server GPU accelerated` supports only ONNX m
- Our examples:
- Keras to ONNX
- PyTorch to ONNX

6 changes: 3 additions & 3 deletions howto-notebooks/model-conversion/keras-to-onnx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ This tutorial explains how to convert a Keras Model stored in tensorflow's 'h5'

The tutorial will also give you ways to execute your model on your local machine.

## Using conda
## Using Virtual Python Environment

If you are using conda as your virtual environment manager, you can easily create an environment with all the necessary dependencies installed using the below command in your terminal
If you are using a virtual python environment manager, you can easily install all the necessary dependencies from requirements.txt

```bash
conda env create -f keras-to-onnx.conda.yml
python -m pip install -r requirements.txt
```

This file was deleted.

This file was deleted.

0 comments on commit 00f287c

Please sign in to comment.