-
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.
add .envdefault and docker-compose.yml
- Loading branch information
Guokan SHANG
committed
Dec 2, 2021
1 parent
85ea60f
commit 9a78670
Showing
6 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
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,4 @@ | ||
APP_LANG=fr en | ||
ASSETS_PATH_ON_HOST=./assets | ||
ASSETS_PATH_IN_CONTAINER=/app/assets | ||
WORKER_NUMBER=1 |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
assets | ||
assets | ||
.env |
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 |
---|---|---|
|
@@ -3,16 +3,14 @@ LABEL maintainer="[email protected]" | |
|
||
WORKDIR /app | ||
|
||
VOLUME /app/assets | ||
ENV ASSETS_PATH=/app/assets | ||
|
||
COPY ./requirements.txt /app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY .envdefault /app/ | ||
COPY ./scripts /app/scripts | ||
COPY ./components /app/components | ||
|
||
HEALTHCHECK --interval=15s CMD curl -fs http://0.0.0.0/health || exit 1 | ||
|
||
ENTRYPOINT ["/home/user/miniconda/bin/uvicorn", "scripts.main:app", "--host", "0.0.0.0", "--port", "80"] | ||
ENTRYPOINT ["/home/user/miniconda/bin/gunicorn", "scripts.main:app", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:80", "--access-logfile", "-", "--error-logfile", "-"] | ||
CMD ["--workers", "1"] |
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
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,13 @@ | ||
version: "3.9" | ||
services: | ||
kpe: | ||
build: . | ||
image: lintoai/linto-platform-keyphrase-extraction:latest | ||
ports: | ||
- "80:80" | ||
env_file: | ||
- .env | ||
volumes: | ||
- $ASSETS_PATH_ON_HOST:$ASSETS_PATH_IN_CONTAINER:ro | ||
command: ["--workers", $WORKER_NUMBER] | ||
runtime: nvidia |
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