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 details)
Built Distribution
File details
Details for the file dummy_app-0.0.2.tar.gz
.
File metadata
- Download URL: dummy_app-0.0.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.5 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 012c5eb7e02ecc4b3f85fea77a1ad9ff7d08d7e68f188ec35330cc8e08bb012d |
|
MD5 | 0a7b8c034f40098bb065ab1575c4e8a2 |
|
BLAKE2b-256 | deabbf44f9cf7abe24d9d2e4c97a5af5c7bc1754f6bd50793213727fa87a3e6e |
File details
Details for the file dummy_app-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: dummy_app-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.11.5 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6376d8b179763d05faa7c27b70236fec786dc0da0fb3724bbf45e721f4fbd6f6 |
|
MD5 | 9d23556f83532705ce0a8126b90c1276 |
|
BLAKE2b-256 | 1d1b0d25ebfe0b638906fc8ce5b8b8b9f81b09e56395262a96d59ac28e55e6a2 |