From 0a7c78bf91adb1a00c4fcaa2bd88bc5cf6d12827 Mon Sep 17 00:00:00 2001 From: David Huggins-Daines Date: Thu, 4 Apr 2024 10:43:57 -0400 Subject: [PATCH] fix: not sure why we need to disable sendfile --- .github/workflows/tests.yml | 2 +- Dockerfile | 2 +- Procfile | 2 +- g2p/tests/test_studio.py | 2 +- pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76f69b33..4a2da515 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: - name: Launch the API run: | coverage run --parallel-mode \ - -m gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --no-sendfile --bind 127.0.0.1:5000 --daemon + -m gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --bind 127.0.0.1:5000 --daemon - name: Run dev suite run: coverage run --parallel-mode run_tests.py dev - name: Run test-studio diff --git a/Dockerfile b/Dockerfile index 44a981f4..e175a39d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,4 @@ COPY Dockerfile /g2p RUN pip3 install -e /g2p # Comment this out if you just want to install g2p in the container without running the studio. -CMD gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --no-sendfile --bind 0.0.0.0:8000 +CMD gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --bind 0.0.0.0:8000 diff --git a/Procfile b/Procfile index 2b84a31f..a257ec4f 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --no-sendfile +web: gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP diff --git a/g2p/tests/test_studio.py b/g2p/tests/test_studio.py index ad068f72..aa847b09 100755 --- a/g2p/tests/test_studio.py +++ b/g2p/tests/test_studio.py @@ -9,7 +9,7 @@ minimal dev mode: python run_studio.py or robust server mode (*nix only, gunicorn does not work on Windows): - gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --no-sendfile --bind 0.0.0.0:5000 --daemon + gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --bind 0.0.0.0:5000 --daemon """ import sys diff --git a/pyproject.toml b/pyproject.toml index f8e1f125..efe94b27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,7 +137,7 @@ lock-filename = "requirements.txt" pip-compile-verbose = false [tool.hatch.envs.prod.scripts] -serve = "gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --no-sendfile --bind 0.0.0.0:5000" +serve = "gunicorn --worker-class uvicorn.workers.UvicornWorker -w 1 g2p.app:APP --bind 0.0.0.0:5000" [tool.hatch.envs.test] features = [ "test" ]