alessandro trinca tornidor commited on
Commit
4aab922
·
1 Parent(s): 8a2e49f

ci: improve env variables

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. aip_trainer/__init__.py +1 -1
Dockerfile CHANGED
@@ -5,6 +5,8 @@ ARG WORKDIR_ROOT
5
  ENV PYTHONPATH="${WORKDIR_ROOT}:${WORKDIR_ROOT}/.venv:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
6
  ENV MPLCONFIGDIR=/tmp/matplotlib
7
  ENV IS_DOCKER_CONTAINER="YES"
 
 
8
 
9
  ENV VIRTUAL_ENV=${WORKDIR_ROOT}/.venv PATH="${WORKDIR_ROOT}/.venv/bin:$PATH"
10
 
 
5
  ENV PYTHONPATH="${WORKDIR_ROOT}:${WORKDIR_ROOT}/.venv:${PYTHONPATH}:/usr/local/lib/python3/dist-packages"
6
  ENV MPLCONFIGDIR=/tmp/matplotlib
7
  ENV IS_DOCKER_CONTAINER="YES"
8
+ ENV LOG_JSON_FORMAT="TRUE"
9
+ ENV LOG_LEVEL="INFO"
10
 
11
  ENV VIRTUAL_ENV=${WORKDIR_ROOT}/.venv PATH="${WORKDIR_ROOT}/.venv/bin:$PATH"
12
 
aip_trainer/__init__.py CHANGED
@@ -10,7 +10,7 @@ from aip_trainer.utils import session_logger
10
 
11
  load_dotenv()
12
  PROJECT_ROOT_FOLDER = Path(globals().get("__file__", "./_")).absolute().parent.parent
13
- LOG_JSON_FORMAT = bool(os.getenv("LOG_JSON_FORMAT", False))
14
  log_level = os.getenv("LOG_LEVEL", "INFO")
15
  session_logger.setup_logging(json_logs=LOG_JSON_FORMAT, log_level=log_level)
16
  app_logger = structlog.stdlib.get_logger(__name__)
 
10
 
11
  load_dotenv()
12
  PROJECT_ROOT_FOLDER = Path(globals().get("__file__", "./_")).absolute().parent.parent
13
+ LOG_JSON_FORMAT = bool(os.getenv("LOG_JSON_FORMAT"))
14
  log_level = os.getenv("LOG_LEVEL", "INFO")
15
  session_logger.setup_logging(json_logs=LOG_JSON_FORMAT, log_level=log_level)
16
  app_logger = structlog.stdlib.get_logger(__name__)