diff --git a/src/everest/detached/jobs/everserver.py b/src/everest/detached/jobs/everserver.py index a95de782245..a8a9402911a 100755 --- a/src/everest/detached/jobs/everserver.py +++ b/src/everest/detached/jobs/everserver.py @@ -21,9 +21,17 @@ from dns import resolver, reversename from fastapi import Depends, FastAPI, HTTPException, Request, status from fastapi.encoders import jsonable_encoder -from fastapi.responses import JSONResponse, PlainTextResponse, Response -from fastapi.security import HTTPBasic, HTTPBasicCredentials +from fastapi.responses import ( + JSONResponse, + PlainTextResponse, + Response, +) +from fastapi.security import ( + HTTPBasic, + HTTPBasicCredentials, +) +from ert.config.parsing.queue_system import QueueSystem from ert.ensemble_evaluator import EvaluatorServerConfig from ert.run_models.everest_run_model import EverestExitCode, EverestRunModel from everest import export_to_csv, export_with_progress @@ -297,10 +305,12 @@ def main(): simulation_callback=partial(_sim_monitor, shared_data=shared_data), optimization_callback=partial(_opt_monitor, shared_data=shared_data), ) - - evaluator_server_config = EvaluatorServerConfig( - custom_port_range=range(49152, 51819), use_ipc_protocol=False - ) + if run_model._queue_config.queue_system == QueueSystem.LOCAL: + evaluator_server_config = EvaluatorServerConfig() + else: + evaluator_server_config = EvaluatorServerConfig( + custom_port_range=range(49152, 51819), use_ipc_protocol=False + ) run_model.run_experiment(evaluator_server_config)