My dummy dash app
Project description
dummy_app
Planning
- Create model train + score api -- done
- Write training/test data to db -- done
- update model train to read database -- done
- to do: need to figure how to pass large datasets through api - jsonify?
- update model train to read database -- done
- create dash app that can visualise -- done
- train/test data scatter plot with linear model predictions
- return predictions
- to do: update to make prettier and include time stamps etc.....
- stand up ci/cd practices - done
- set up git hooks - done
- linting pre-hooks?
- pytest unit tests?
- github actions - done
- Steps
- build simple tests
- run on github actions on push
- set up git hooks - done
- create docker file that can run and query data -- done
- docker to create and publish dockerfile
- Package pipeline - done
- Test building + importing package -- done
- Publish package -- done
- Convert env to poetry - done
- Host App + serve dataset on cloud platform
- Get app to deploy to hosted service
- how to connect api to app -- done
- Update Docker App
- use Gunicorn
- Run API + App in same env -- done
- Update Docker App
- how to connect api to app -- done
- Get deployment to use package
- Connect deployments to github actions
- Get app to deploy to hosted service
Useful code
# Poetry
poetry update
poetry install
poetry build
poetry config pypi-token.pypi <token>
poetry publish -- build
# Run app
python dummy_app/model_api_v2.py &
sleep 5
python dummy_app/app.py
# Docker commands
docker ps
docker run -d -it flask-api-image bash
docker exec -it ubuntu bash
docker exec -it flask-api-image bash
docker exec -it <container id or name> bash
# Other
docker-compose down # Stop container on current dir if there is a docker-compose.yml
docker rm -fv $(docker ps -aq) # Remove all containers
sudo lsof -i -P -n | grep 8000 # List who's using the port
sudo lsof -i -P -n | grep python
# Kill jobs
sudo lsof -i -P -n | grep python
sudo lsof -i -P -n | grep python | awk '{print $2}'
sudo lsof -i -P -n | grep python | awk '{print $2}' | xargs sudo kill -9
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dummy_app-0.0.2.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for dummy_app-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6376d8b179763d05faa7c27b70236fec786dc0da0fb3724bbf45e721f4fbd6f6 |
|
MD5 | 9d23556f83532705ce0a8126b90c1276 |
|
BLAKE2b-256 | 1d1b0d25ebfe0b638906fc8ce5b8b8b9f81b09e56395262a96d59ac28e55e6a2 |