Skip to content

Commit

Permalink
Testing: Dockerfile cannot response as correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
insung3511 committed Oct 19, 2023
1 parent 60806e7 commit e754920
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ secret_key.json
dummy.mp4
extracted_skeleton.json

keys

experiements/

.vscode
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.9
FROM python:3.10.0-slim-buster

WORKDIR /app

Expand All @@ -16,4 +16,5 @@ RUN export PYTORCH_ENABLE_MPS_FALLBACK=1

ENV SECRET_KEY_FILE=/run/secrets/secret_key.json

CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "error"]
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "trace", "--ssl-keyfile=./app/keys/private.key", "--ssl-certfile=./app/keys/certificate.crt", "--ws-max-size", "167772160", "--ws-max-queue", "128"]
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from connector import database_connector, database_query
from fastapi import FastAPI, File, UploadFile, Form

from fastapi.middleware.cors import CORSMiddleware
from fastapi.middleware.cors import CORSMiddleware
from fastapi.responses import PlainTextResponse
from fastapi.exceptions import RequestValidationError

Expand All @@ -16,7 +16,7 @@
EXTRACTOR_THRESHOLD = 0.85

app = FastAPI()
extractor = SkeletonExtractor(pretrained_bool=True, number_of_keypoints=17, device='cpu')
extractor = SkeletonExtractor(pretrained_bool=True, number_of_keypoints=17, device='mps')
preprocessor = DataPreprocessing()
metrics = Metrics()

Expand Down

0 comments on commit e754920

Please sign in to comment.