diff --git a/bus.jpg b/bus.jpg deleted file mode 100644 index 40eaaf5..0000000 Binary files a/bus.jpg and /dev/null differ diff --git a/src/Python/flask/.dockerignore b/src/Python/flask/.dockerignore new file mode 100644 index 0000000..ed8ebf5 --- /dev/null +++ b/src/Python/flask/.dockerignore @@ -0,0 +1 @@ +__pycache__ \ No newline at end of file diff --git a/src/Python/flask/Dockerfile b/src/Python/flask/Dockerfile new file mode 100644 index 0000000..0f3eb02 --- /dev/null +++ b/src/Python/flask/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.9 + +WORKDIR /app + +COPY . . + +RUN apt-get update && apt-get install -y libgl1 + + +RUN pip install -r requirements.txt + +EXPOSE 5000 + +CMD ["python", "web/app.py"] + +#build instruction: sudo docker buildx build -t flaskapp:latest . +#run instruction: sudo docker run --network="host" flaskapp:latest +# need to use network host to connect to the host machine's localhost to connect to mqtt server \ No newline at end of file diff --git a/src/Python/flask/requirements.txt b/src/Python/flask/requirements.txt new file mode 100644 index 0000000..10c12cf --- /dev/null +++ b/src/Python/flask/requirements.txt @@ -0,0 +1,5 @@ +Flask==3.1.0 +paho-mqtt==1.6.1 +ultralytics==8.3.58 +opencv-python-headless==4.6.0.66 +numpy==1.23.4