diff --git a/.dockerignore b/.dockerignore index cb2a376c16..b37ccbf0fe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,8 @@ # exclude items not needed/conflict on docker image +.git +.idea +.DS_Store .github venv .venv diff --git a/data/pickles/.gitkeep b/data/pickles/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 3a86c9afd5..1bc6ebeb6c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -9,7 +9,7 @@ version: '3.5' services: tram: - image: ghcr.io/center-for-threat-informed-defense/tram:latest + image: ghcr.io/center-for-threat-informed-defense/tram-private:swfarnsworth-bert-django-container-buildable environment: - DATA_DIRECTORY=/tram/data - ALLOWED_HOSTS=["example_host1", "localhost"] @@ -20,7 +20,7 @@ services: - tram:/tram/data - tram_static:/tram/src/tram/staticfiles nginx: - image: ghcr.io/center-for-threat-informed-defense/tram-nginx:latest + image: ghcr.io/center-for-threat-informed-defense/tram-private-nginx:swfarnsworth-bert-django-container-buildable ports: - "8000:80" volumes: diff --git a/src/tram/ml/base.py b/src/tram/ml/base.py index 786b99260d..c03046d306 100644 --- a/src/tram/ml/base.py +++ b/src/tram/ml/base.py @@ -527,7 +527,7 @@ def run_model(self, run_forever=False): time.sleep(1) def get_model_filepath(self, model_class): - filepath = settings.ML_MODEL_DIR + "/" + model_class.__name__ + ".pkl" + filepath = settings.PICKLE_DIR + "/" + model_class.__name__ + ".pkl" return filepath def train_model(self): diff --git a/src/tram/settings.py b/src/tram/settings.py index b3023838ca..49893a6a9c 100644 --- a/src/tram/settings.py +++ b/src/tram/settings.py @@ -225,5 +225,6 @@ } ML_MODEL_DIR = os.path.join(DATA_DIRECTORY, "ml-models") +PICKLE_DIR = os.path.join(DATA_DIRECTORY, "pickles") DEFAULT_AUTO_FIELD = "django.db.models.AutoField"