init command

  1. Usage
    1. Requirements
    2. TensorFlow
    3. Guild AI
    4. Resource cache
  2. Options


guild init [OPTIONS] [DIR]

Initialize a Guild environment.

init initializes a Guild environment in DIR, which is the current directory by default.

init creates a virtual environment in DIR using virtualenv.

Use ‑‑python to specify the Python interpreter to use within the generated virtual environment. If no‑venv is specified, ‑‑python is ignored.


By default, any required packages listed under packages.requires in guild.yml in the environment parent directory are installed into the environment. Use ‑‑no‑reqs to suppress this behavior.

Additionally, packages defined in requirements.txt in the environment parent directory will be installed. Use ‑‑no‑reqs to suppress this behavior.

Note that packages defined in guild.yml use Guild package names while packages defined in requirements.txt use PyPI package names.

For information in requirements files, see:

You may explicitly specify requirements file using ‑r or ‑‑requirement. If ‑r, ‑‑requirement is specified, Guild will not automatically install packages in requirements.txt -- that file must be specified explicitly in the command.


By default init installs TensorFlow in the initialized environment if it's not already installed. When Guild installs TensorFlow, it detects GPU support on the system and selects the appropriate package: tensorflow‑gpu for GPU support, otherwise tensorflow.

To override the default package, use ‑‑gpu to install the tensorflow‑gpu package or ‑‑no‑gpu to install the tensorflow package.

To skip installing TensorFlow, use ‑‑no‑tensorflow.

If TensorFlow was installed by way of a requirements file, either requirements.txt located in the environment parent directory or a file specified by a ‑‑requirement option, Guild will not reinstall it.

Guild AI

By default init installs the active version of Guild AI in the initialized environment. To install a different version, or to install a Guild wheel distribution file use the ‑‑guild option.

Resource cache

By default resources are cached and shared at the user level in ~/.guild/cache/resources so that resources downloaded from one environment are available to other environments. You can modify this behavior to have all resources downloaded local to the environment by specifying ‑‑local‑resource‑cache.


-n, --name NAME

Environment name (default is env parent directory name).

--python VERSION

Version of Python to use for the environment.


Version of Guild AI to use for the environment. By default, the active version of Guild is installed. This value may alternatively be a path to a Guild wheel distribution.


Use the GPU enabled tensorflow package for the environment.


Use the non-GPU tensorflow package for the environment.


Do not install TensorFlow in the environment.

-r, --requirement FILE

Install packages defined in FILE. May be used multiple times.

-p, --path DIR

Include DIR as a Python path in the environment.


Don't install from requirements.txt or guild.yml in environment parent directory.


Use a local cache when initializing an environment.

-y, --yes

Initialize a Guild environment without prompting.


Don't show progress when installing environment packages.

--help Show command help and exit.
Guild AI version 0.5.1