Configuring a Python runtime environment for ML for IBM z/OS

ML for IBM z/OS® uses the Python packages of Python AI Toolkit for IBM® z/OS for model training. If you have not configured and started a Python runtime environment by using the configuration tool, you can do so now by running the create-python-runtime.sh script.

Before you begin

Procedure

  1. Locate the create-python-runtime.sh script in the $IML_INSTALL_ENT_DIR/imlpython/bin directory.
  2. Run the create-python-runtime.sh script:
    ./create-python-runtime.sh

    The script will gather needed information and then perform a sequence of tasks to create and configure a new Python runtime environment for ML for IBM z/OS. In the event of any error, the script will stop. You must fix the error and rerun the script.

  3. When prompted, respond by entering requested information or accepting the default.
    • Enter the name for your Python virtual environment or press Enter to use the default name of mlzenv.

    • Configure source to install Python packages. Enter Y to use default IBM-hosted server or N to use user-hosted server.

    • If you choose to use user-hosted server:

      1. Enter the index URL for user-hosted server.

      2. Enter user-hosted server user ID or press enter if user ID is not needed.

      3. Enter user-hosted server password if user ID is needed.

    • If you choose to use a proxy server:

      1. Enter the proxy server URL in the form ‘scheme://proxy.server:port’.

      2. Enter the proxy server user ID or press enter (to log in without a user ID).

      3. Enter the proxy server password (to log in with the user ID).

    The overall process of creating and configuring a Python runtime environment completes after you see a message similar to the following example:

    Congratulations! You have successfully installed Python runtime!
  4. If necessary, run the create-python-runtime.sh script again to recreate an existing Python runtime environment or create a new one.
  5. If an update for Python packages is available, run the create-python-runtime.sh script with -u option to upgrade or update the existing runtime environment:
    1. First, copy the requirements.txt (the updated list of packages that make up the complete Python AI Toolkit for IBM z/OS) to the $IML_HOME/imlpython/conf directory.
    2. Run the create-python-runtime.sh script with -u option:
      ./create-python-runtime.sh -u

    The script will ask to enter the name for your existing Python virtual environment or press Enter if it is the default name of mlzenv.

    The overall process of upgrading or updating a Python runtime environment completes when you see a message similar to the following example:
    Congratulations! You have successfully upgraded Python runtime!

What to do next