docker-compose up --build
# Build
docker build -t object-detection .
# Run
docker run -e PORT=8080 -p 8080:8080 object-detection:latest
then visit http://localhost:8080/ in your browser:
Good for testing models without restarting/relying on Flask server.
- Run Docker container using steps above
- In new command line window run
docker container ls # (get running docker container name)
docker exec [running docker container name] python3 tests/[test file name]
python3 -m venv venv
source venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python3 webapp.py --port 8080
then visit http://localhost:8080/ in your browser:
gcloud services enable containerregistry.googleapis.com
docker pull <docker-id>/<image-name>
docker tag <docker-id>/<image-name> gcr.io/<project-id>/<image-name>
docker push gcr.io/<project-id>/<image-name>
https://colab.research.google.com/drive/1dBh5onisO2XdNzwVmCosnYGTca_eFaVW?usp=sharing