Skip to content

Commit

Permalink
chore: allow to specify triton URI as one envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 12, 2024
1 parent fb60549 commit abcc2e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ POSTGRES_PASSWORD=postgres
# POSTGRES_EXPOSE=127.0.0.1:5432

# Triton ML inference server
TRITON_HOST=triton
TRITON_URI=triton:8001

# Fasttext (langid) inference server
FASTTEXT_HOST=fasttext
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
echo "ELASTIC_HOST=elasticsearch.robotoff_default" >> .env
echo "ELASTIC_USER=elastic" >> .env
echo "ELASTIC_PASSWORD=${{ secrets.ELASTIC_PASSWORD }}" >> .env
echo "TRITON_HOST=triton" >> .env
echo "TRITON_URI=triton:8001" >> .env
echo "TRITON_MODELS_DIR=./models/triton" >> .env
echo "FASTTEXT_HOST=fasttext" >> .env
echo "FASTTEXT_MODEL_DIR=./models" >> .env
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ x-robotoff-base-env:
ELASTIC_HOST:
ELASTIC_PASSWORD:
ELASTIC_USER:
TRITON_HOST:
TRITON_URI:
FASTTEXT_HOST:
FASTTEXT_PORT:
ENABLE_MONGODB_ACCESS:
Expand Down
5 changes: 1 addition & 4 deletions robotoff/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,7 @@ def get_package_version() -> str:
ROBOTOFF_USER_AGENT = "Robotoff Live Analysis"
# Models and ML

_triton_host = os.environ.get("TRITON_HOST", "localhost")
_triton_grpc_port = os.environ.get("TRITON_PORT", "8001")
TRITON_URI = f"{_triton_host}:{_triton_grpc_port}"

TRITON_URI = os.environ.get("TRITON_URI", "triton:8001")
TRITON_MODELS_DIR = PROJECT_DIR / "models/triton"

_fasttext_host = os.environ.get("FASTTEXT_HOST", "fasttext")
Expand Down

0 comments on commit abcc2e5

Please sign in to comment.