Skip to content

Commit

Permalink
Fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-souza committed Dec 18, 2024
1 parent 849c4ad commit 3083ca8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deployment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ RUN conda create -n flowcept python=3.11.10 -y \

# The following command is an overkill and will install many things you might not need. Please modify this Dockerfile in case you do not need to install "all" dependencies.
RUN conda run -n flowcept pip install -e .[all]
RUN conda run -n flowcept pip install -e .[ml_all]
RUN conda run -n flowcept pip install -e .[ml_dev]

CMD ["bash"]
3 changes: 3 additions & 0 deletions src/flowcept/commons/daos/docdb_dao/docdb_dao_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,18 @@ def get_instance(*args, **kwargs) -> "DocumentDBDAO":

if MONGO_ENABLED:
from flowcept.commons.daos.docdb_dao.mongodb_dao import MongoDBDAO

DocumentDBDAO._instance = MongoDBDAO(*args, **kwargs)
elif LMDB_ENABLED:
from flowcept.commons.daos.docdb_dao.lmdb_dao import LMDBDAO

DocumentDBDAO._instance = LMDBDAO()
else:
raise NotImplementedError
# TODO: revise, this below may be better in subclasses
DocumentDBDAO._instance._initialized = True
return DocumentDBDAO._instance

def close(self):
"""Close DAO connections and release resources."""
del DocumentDBDAO._instance
Expand Down
2 changes: 1 addition & 1 deletion src/flowcept/commons/daos/docdb_dao/lmdb_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LMDBDAO(DocumentDBDAO):
# return DocumentDBDAO._instance

def __init__(self):
#if not hasattr(self, "_initialized"):
# if not hasattr(self, "_initialized"):
self._initialized = True
self._open()

Expand Down
2 changes: 1 addition & 1 deletion src/flowcept/commons/daos/docdb_dao/mongodb_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MongoDBDAO(DocumentDBDAO):
# return DocumentDBDAO._instance

def __init__(self, create_indices=MONGO_CREATE_INDEX):
#if not hasattr(self, "_initialized"):
# if not hasattr(self, "_initialized"):
from flowcept.configs import (
MONGO_HOST,
MONGO_PORT,
Expand Down
7 changes: 5 additions & 2 deletions src/flowcept/flowcept_api/flowcept_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,15 @@ def start(self):

def _init_persistence(self, mq_host=None, mq_port=None):
from flowcept.flowceptor.consumers.document_inserter import DocumentInserter
self._db_inserters.append(DocumentInserter(

self._db_inserters.append(
DocumentInserter(
check_safe_stops=True,
bundle_exec_id=self._bundle_exec_id,
mq_host=mq_host,
mq_port=mq_port,
).start())
).start()
)

def stop(self):
"""Stop it."""
Expand Down
2 changes: 1 addition & 1 deletion src/flowcept/instrumentation/flowcept_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def wrapper(*args, **kwargs):
task_dict = dict(
type="task",
# User must explicitly set workflow_id in kwargs to reduce overhead finding for it
#workflow_id=kwargs.pop("workflow_id", None),
# workflow_id=kwargs.pop("workflow_id", None),
activity_id=func.__name__,
used=kwargs,
generated=result,
Expand Down

0 comments on commit 3083ca8

Please sign in to comment.