A REST API to pilot the Ecotaxa pipelines
pip install fastapi
pip install pydantic
pip install "uvicorn[standard]"
<!-- pip3 install opencv-python -->
pip install opencv-python
pip install requests
pip install numpy
uvicorn main:app --reload
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
#pip install uvicorn # if issue run manually uviicorn installation
# uvicorn main:app --reload
python -m uvicorn main:app --reload
http://127.0.0.1:8000/docs http://127.0.0.1:8000/redoc
ssh niko
cd ~/complex/DEEP-OC-multi_plankton_separation
docker build -t deephdc/uc-ecotaxa-deep-oc-multi_plankton_separation .
~/complex/DEEP-OC-multi_plankton_separation$
docker run -ti -p 5000:5000 -p 6006:6006 -p 8888:8888 deephdc/uc-ecotaxa-deep-oc-multi_plankton_separation
~/complex/DEEP-OC-multi_plankton_separation$
docker run -d -ti -p 5000:5000 -p 6006:6006 -p 8888:8888 deephdc/uc-ecotaxa-deep-oc-multi_plankton_separation
~/complex/DEEP-OC-multi_plankton_separation$
docker run -d -ti -p 5000:5000 -p 6006:6006 -p 8889:8888 deephdc/uc-ecotaxa-deep-oc-multi_plankton_separation
In VSCode Thumder plugin, use the collection named Happy Pipeline
- to see if server alive test DEEP plankton separation - niko alive ? : to see if multi_plankton_separation is alive on Niko server
Built it
docker build -t gateway_api .
Run it
docker run -p 8000:8000 -v /Users/sebastiengalvagno/piqv/plankton/:/app/data --name happy_pipeline gateway_api
when use Docker use .env.production else .env.development
at this moment, I can't run in docker because the path are linked to other apps then it can't find the file
a possibility, to use docker, is to make the very long local path in the container and use .env.development
make a tunnel before open on with local address, port do not pass throught the VPN
ssh -f niko -L 5001:localhost:5000 -N
open http://localhost:5001/ui
cd complex
git clone https://github.com/ai4os-hub/zooprocess-multiple-separator.git
cd zooprocess-multiple-separator/
docker build -t zooprocess-multiple-separator:1 .
docker build --no-cache -t zooprocess-multiple-separator:lastest .
docker run -d -ti -p 5000:5000 -p 6006:6006 -p 8888:8888 zooprocess-multiple-separator:1
no detach mode to see error
docker run -ti -p 5000:5000 -p 6006:6006 -p 8888:8888 zooprocess-multiple-separator:1
openapigenerator generate -i http://localhost:5000/openapi.json -g python -o ./src
python3 -m venv test_venv
source test_venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python3 -m unittest discover tests
or one test
python -m unittest tests/*.py
add -v for verbose mode, and ahave list of test functions
Run only on test function
python -m unittest tests.test_server.Test_server.test_dbserver_withconfig