-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from rodrigobarbaedu/develop
Release 2
- Loading branch information
Showing
13 changed files
with
1,929 additions
and
308 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use Python 3.11 Slim as base image | ||
FROM python:3.11-slim | ||
|
||
# Enable working directory | ||
WORKDIR /app | ||
|
||
# Copy requirements.txt file to the container | ||
COPY requirements.txt /app/ | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 | ||
|
||
# Install dependencies | ||
RUN python -m venv venv && \ | ||
. venv/bin/activate && \ | ||
pip install --no-cache-dir -r requirements.txt | ||
|
||
# Expose the port 5050 | ||
EXPOSE 5050 | ||
|
||
# Copy the application code (app.py) from /app | ||
COPY /static /app/static | ||
COPY /templates /app/templates | ||
COPY /obstacle_tracking.py /app/app.py | ||
|
||
# Run the application | ||
CMD ["/bin/bash", "-c", ". venv/bin/activate && python app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Use Python 3.11 Slim as base image | ||
FROM python:3.11-slim | ||
|
||
# Enable working directory | ||
WORKDIR /app | ||
|
||
# Copy requirements.txt file to the container | ||
COPY requirements.txt /app/ | ||
|
||
# Install required packages | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
libqt5gui5 \ | ||
libqt5widgets5 \ | ||
libqt5core5a \ | ||
libxcb-xinerama0 \ | ||
libxcb1 \ | ||
libxkbcommon-x11-0 \ | ||
libglib2.0-0 \ | ||
libgl1-mesa-glx \ | ||
libfontconfig1 \ | ||
libdbus-1-3 | ||
|
||
# Clean up the apt cache | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install dependencies | ||
RUN python -m venv venv && \ | ||
. venv/bin/activate && \ | ||
pip install --no-cache-dir -r requirements.txt | ||
|
||
# Expose the port 5050 | ||
EXPOSE 5050 | ||
|
||
# Copy the application code (app.py) from /app | ||
COPY /static /app/static | ||
COPY /templates /app/templates | ||
COPY /color_ball_tracker.py /app/app.py | ||
|
||
# Run the application | ||
CMD ["/bin/bash", "-c", ". venv/bin/activate && python app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app-1: | ||
build: | ||
context: ../ # Specify the context of the build | ||
dockerfile: docker/Dockerfile.app1 # Specify the Dockerfile to use | ||
ports: | ||
- "5050:5050" # Map port 5000 in the container to port 5050 on the host | ||
networks: | ||
- flask-network # Connect the container to the flask-network | ||
|
||
app-2: | ||
build: | ||
context: ../ # Specify the context of the build | ||
dockerfile: docker/Dockerfile.app2 # Specify the Dockerfile to use | ||
ports: | ||
- "5050:5050" # Map port 5000 in the container to port 5051 on the host | ||
networks: | ||
- flask-network # Connect the container to the flask-network | ||
|
||
networks: | ||
flask-network: | ||
driver: bridge # Use the bridge network driver |
Oops, something went wrong.