Skip to content

Commit

Permalink
Merge pull request #1541 from vespa-engine/thomasht86/no-hot-reload-i…
Browse files Browse the repository at this point in the history
…n-prod

hot reload from env
  • Loading branch information
andreer authored Oct 25, 2024
2 parents 6b0a07f + 35937cc commit b714a4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion visual-retrieval-colpali/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ VESPA_CLOUD_MTLS_KEY="-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----"
VESPA_CLOUD_MTLS_CERT="-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----"
-----END CERTIFICATE-----"
HOT_RELOAD=true
4 changes: 3 additions & 1 deletion visual-retrieval-colpali/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,6 @@ def get():

if __name__ == "__main__":
# ModelManager.get_instance() # Initialize once at startup
serve(port=7860)
HOT_RELOAD = os.getenv("HOT_RELOAD", "False").lower() == "true"
print(f"Starting app with hot reload: {HOT_RELOAD}")
serve(port=7860, reload=HOT_RELOAD)

0 comments on commit b714a4e

Please sign in to comment.