This project can be used for training Cuda yolov5 and TensorFlow(yet to be implimented) models. It can also run inference and model evaluation.
- Node js
- Python 3.8.5
Use the package manager pip
cd flasklocal
pip install -r requirements.txt --user
python app.py
If you are using a conda environment:
conda install pywin32
cd flaskremote
pip install -r requirements.txt
python app.py
Test Developement Environment: https://safe-lake-33465.herokuapp.com/#/labelling
For the test Dev env to work properly, you must run the flasklocal python app.py on your computer
cd vue
npm install
npm start
To install PyTorch via pip, and do have a CUDA-capable system
To ensure that PyTorch was installed correctly, we can verify the installation by running sample PyTorch code. Here we will construct a randomly initialized tensor.
import torch
x = torch.rand(5, 3)
print(x)
Additionally, to check if your GPU driver and CUDA is enabled and accessible by PyTorch, run the following commands to return whether or not the CUDA driver is enabled:
import torch
torch.cuda.is_available()
This will deploy the login server as well as the web interface to Heroku. The local flask application must run on the local machine.
Build the vue project. This will create two folders in the flaskremote folder. These are used for flask to render later on in Heroku.
- vuestatic
- vuetemplates
npm run build
https://devcenter.heroku.com/articles/getting-started-with-python
Change the git origin to your Heroku git (optional)
> git remote -v
heroku https://git.heroku.com/foxeelogin.git (fetch)
heroku https://git.heroku.com/foxeelogin.git (push)
> git remote set-url origin [git@your.git.repo.example.com]
cd flaskremote
git add .
git commit -m "example deploy"
git push heroku master
If you made changes to the DB, it needs to be updated in the Heroku Postgres DB as well. Install postgres and make sure the /bin folder is in your system path https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
cd flaskremote
heroku pg:psql
=> (write postgresql here to update tables)
=> ALTER TABLE "Company" ADD COLUMN "CreatedDate" TIMESTAMP;
=> ALTER TABLE "Company" ALTER COLUMN "CreatedDate" SET DEFAULT now();
The app should be now deployed to your Heroku app. Here is the current dev environment: https://foxeelogin.herokuapp.com/app#/login
- Make a docker image
- Tag the image with your image like "yourdockerusername/yourappname"
- push to the hub
- go to AWS EC2
- https://aws.amazon.com/getting-started/hands-on/deploy-docker-containers/