Kevin Mach
08/07/2024, 4:02 PMMarvin
08/07/2024, 4:02 PMrun_shell_script step that could help you.
1. Expanding Environment Variables:
Make sure to set expand_env_vars: true in your run_shell_script step if you are using environment variables.
2. Example Format:
Here's a general structure for using the run_shell_script step:
- prefect.deployments.steps.run_shell_script:
id: run-script
script: |
echo "Current directory:"
cd
echo "Activating virtual environment and running script..."
call .venv\Scripts\activate.bat && .venv\Scripts\python main_flow.py
expand_env_vars: true
stream_output: true
3. Environment Activation:
Ensure that your script line for activating the virtual environment using call .venv\Scripts\activate.bat is correct and the path matches your virtual environment setup.
For more detailed information, you can refer to the Prefect Deployment Documentation.
If you still encounter issues, please provide more details, and we can dig deeper into troubleshooting.