AIforEarth-API-Development icon indicating copy to clipboard operation
AIforEarth-API-Development copied to clipboard

Feature Request: Add tips for quicker interactive app development

Open rbavery opened this issue 4 years ago • 0 comments

Hello, I'm making some updates to my application and am wondering if there are some suggestions that could be made for:

  1. hot reloading the application if a python file is changed I need to run docker build -t pytorchapp-prod -f ./Dockerfile-prod . and then docker run -it -p 8081:80 --runtime=nvidia pytorchapp-prod to reload any changes I've made to my app. This isn't so bad but can get a bit cumbersome.

I tried to mount the app folder in my host machine to the docker container with --mount type=bind,source="$(pwd)/pytorch_api",target=/app/pytorch_api and then add py-autoreload=3 in supervisord.conf to monitor for changes to application files (which I make in vscode on my host machine). However this doesn't seem to work and either the files aren't being monitored for changes or the changes are not being propagated to the application.

  1. (less important) sending logs from log = AI4EAppInsights to the terminal during development so that messages from calls to log.log_debug are visible. It'd be nice to do local development with the same logging statements that interface with the AppInsights service for easier portability. Right now I'm replacing all these logging statements with print so that I can see them in the terminal logs to debug my app.

rbavery avatar Jan 01 '21 01:01 rbavery