-
-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PIPELINES_ENV #316
base: main
Are you sure you want to change the base?
Add PIPELINES_ENV #316
Conversation
Add option run in ENV=development mode
is it possible to add env for uvicorn options? It could be useful to increase the number of workers like this fastapi with workers |
@sir3mat - yes... it should be possible... env like PIPELINES_WORKERS based on docs - https://github.com/defunkt/unicorn/blob/master/README it could be somthing like this... if [ "$PIPELINES_ENV" = "production" ] || [ -z "$PIPELINES_ENV" ]; then
if [ "$PIPELINES_WORKERS" = "auto" ]; then
CPU_COUNT=$(nproc)
WORKERS=$((2 * CPU_COUNT + 1))
else
WORKERS="${PIPELINES_WORKERS:-1}"
fi
uvicorn main:app --host "$HOST" --port "$PORT" --workers "$WORKERS" --forwarded-allow-ips '*'
else
echo "INFO: Running in development mode"
# "workers" flag will be ignored when reloading is enabled.
uvicorn main:app --host "$HOST" --port "$PORT" --forwarded-allow-ips '*' --reload
fi i will try to check that later... but now i need also support venv for requirments and that is on my top task list |
add support env: PIPELINES_VENV PIPELINES_VENV_AUTOUPGRADE PIPELINES_VENV_PATH + PIPELINES_WORKERS
New Environment Variables for
|
Is it possible to enable also the "workers" params in openwebui interface? |
@sir3mat |
add langflow pipeline example
incorrect repo name / not in main
Enhance the
start.sh
script to recognize and utilize thePIPELINES_ENV
environment variable as follows:Development Mode:
PIPELINES_ENV=development
, executeuvicorn
with the--reload
option. This will streamline the development process of Python pipelines by automatically reloading the server upon code changes.Production Mode:
PIPELINES_ENV=production
or ifPIPELINES_ENV
is unset or undefined, runuvicorn
in its standard mode without the--reload
option.This change will accommodate both development and production environments seamlessly.