Skip to content

Commit

Permalink
Merge pull request #936 from Shared-Reality-Lab/moving-healthchecks
Browse files Browse the repository at this point in the history
Deploying Preprocessor Healthchecks
  • Loading branch information
shahdyousefak authored Dec 20, 2024
2 parents 31090fd + c11e325 commit 114140f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 23 deletions.
3 changes: 3 additions & 0 deletions preprocessors/grouping/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ EXPOSE 5000

ENV FLASK_APP=grouping.py
USER python

HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=5 CMD curl -f http://localhost:5000/health || exit 1

CMD [ "gunicorn", "grouping:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug" ]
3 changes: 3 additions & 0 deletions preprocessors/mmsemseg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ RUN wget https://image.a11y.mcgill.ca/resources/models/mmsemseg/upernet_beit-bas
EXPOSE 5000
ENV FLASK_APP=segment.py
USER python

HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=5 CMD curl -f http://localhost:5000/health || exit 1

CMD [ "gunicorn", "segment:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug" ]
3 changes: 3 additions & 0 deletions preprocessors/ocr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ EXPOSE 5000

ENV FLASK_APP=ocr.py
USER python

HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=5 CMD curl -f http://localhost:5000/health || exit 1

CMD [ "gunicorn", "ocr:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug" ]
24 changes: 1 addition & 23 deletions test-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ services:

# override gpu selection on test environment
semantic-segmentation:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 60s
timeout: 10s
retries: 5
start_period: 120s
deploy:
resources:
reservations:
Expand Down Expand Up @@ -120,20 +114,4 @@ services:
- "traefik.http.routers.tat.tls.certresolver=myresolver"
- traefik.docker.network=traefik
environment:
- SERVER_NAME=unicorn.cim.mcgill.ca

object-grouping:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 60s
timeout: 10s
retries: 5
start_period: 120s

ocr-clouds-preprocessor:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 60s
timeout: 10s
retries: 5
start_period: 120s
- SERVER_NAME=unicorn.cim.mcgill.ca

0 comments on commit 114140f

Please sign in to comment.