Skip to content

Commit

Permalink
⭕ define envs
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazebr committed Oct 30, 2023
1 parent ccdd42c commit 677b8b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions packages/ml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM python:3.10-slim-bullseye AS prod

ENV ENV_FILE="docker"

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random
Expand Down
4 changes: 1 addition & 3 deletions packages/ml/src/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

logger.debug(f"ENV_FILE: {ENV_FILE}")

if ENV_FILE == 'docker':
load_dotenv()
else:
if ENV_FILE != 'docker':
load_dotenv(dotenv_path='../.local.env')

OPENAI_API_MODEL = os.getenv("OPENAI_API_MODEL", "gpt-3.5-turbo")
Expand Down
2 changes: 2 additions & 0 deletions packages/vector_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM python:3.10-slim-bullseye AS prod

ENV ENV_FILE="docker"

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random
Expand Down
4 changes: 1 addition & 3 deletions packages/vector_server/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

logger.debug(f"ENV_FILE: {ENV_FILE}")

if ENV_FILE == 'docker':
load_dotenv()
else:
if ENV_FILE != 'docker':
load_dotenv(dotenv_path='../.local.env')

OPENAI_API_MODEL = os.getenv("OPENAI_API_MODEL", "gpt-3.5-turbo-0613")
Expand Down

0 comments on commit 677b8b2

Please sign in to comment.