diff --git a/Dockerfile b/Dockerfile index e03654f..0019c7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,6 @@ COPY src src/ EXPOSE 5000 -CMD ["gunicorn", "application:app", "-b", "0.0.0.0:5000", "-w", "4"] +WORKDIR /src + +CMD ["/.venv/bin/gunicorn", "application:app", "-b", "0.0.0.0:5000", "-w", "4"] diff --git a/src/application.py b/src/application.py index 0fa4a17..2f8ee04 100644 --- a/src/application.py +++ b/src/application.py @@ -11,8 +11,8 @@ version = importlib.metadata.version("mc-intent-classifier") - -DATA_PATH = Path("src/data") +dirname = os.path.dirname(__file__) +DATA_PATH = Path(f"{dirname}/data") OUTPUT_FILE_PATH = DATA_PATH / "new_test_intent_embeddings.json" app = Flask(__name__)