-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ Getting Started | |
configuration | ||
running_wooey | ||
scripts | ||
venv_setup | ||
wooey_ui | ||
api | ||
api_keys | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Virtual Environment Setup | ||
========================= | ||
|
||
Virtual environments allow you to specify a python interpreter and a set of requirements to run a script in. | ||
|
||
Like with script addition, virtual environment setup is done via the Django admin. | ||
|
||
Adding a virtual environment | ||
---------------------------- | ||
|
||
Virtual environments may be setup from the admin under the `Virtual Environments` section: | ||
|
||
.. image:: img/venv_admin_page.png | ||
|
||
To add a virtual environment, click the Add button and a form will be rendered for setting up a new virtual environment. | ||
|
||
.. image:: img/venv_change_form.png | ||
|
||
The fields are: | ||
|
||
*name* What to call the virtual environment. Virtual environments can be reused across scripts if desired. | ||
*python binary* The path to a python executable to create and use for running the virtual environment | ||
*requirements* This is equivalent to the requirements.txt file for defining packages to install | ||
*Venv directory* Where to store the virtual environment. The default location for this can be defined via the `WOOEY_VIRTUAL_ENVIRONMENT_DIRECTORY` | ||
setting. If not defined, this defaults to the system temporary directory folder. | ||
|
||
Lastly, to add the virtual environment to a script, from the script admin view, choose the virtual environment to run | ||
the script in: | ||
|
||
.. image:: img/venv_set_script_venv.png | ||
|
||
Adding scripts with invalid imports | ||
----------------------------------- | ||
|
||
Virtual environments are meant to have requirements that may not be present on the main Wooey server. Thus, some | ||
scripts may fail to import because of dependency conflicts. To resolve this, a new option is available on scripts, | ||
`ignore_bad_imports`, that may be set via the admin. | ||
|
||
.. image:: img/ignore_bad_imports.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters