mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 20:04:58 +00:00
added dockerfile
This commit is contained in:
1
src/Python/flask/.dockerignore
Normal file
1
src/Python/flask/.dockerignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
__pycache__
|
18
src/Python/flask/Dockerfile
Normal file
18
src/Python/flask/Dockerfile
Normal file
@@ -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
|
5
src/Python/flask/requirements.txt
Normal file
5
src/Python/flask/requirements.txt
Normal file
@@ -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
|
Reference in New Issue
Block a user