Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit fb71045

Browse files
committed
fix: e2e docker
1 parent 0f29b21 commit fb71045

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docker/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ echo "enableCors: true" >> /root/.cortexrc
77

88
# Install the engine
99
cortex engines install llama-cpp -s /opt/cortex.llamacpp
10-
cortex engines list
1110

1211
# Start the cortex server
1312
cortex start
13+
cortex engines list
1414

1515
# Keep the container running by tailing the log files
1616
tail -f /root/cortexcpp/logs/cortex.log &

engine/cli/commands/server_start_cmd.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ bool TryConnectToServer(const std::string& host, int port) {
2828

2929
bool ServerStartCmd::Exec(const std::string& host, int port,
3030
const std::optional<std::string>& log_level) {
31+
if (IsServerAlive(host, port)) {
32+
CLI_LOG("The server has already started");
33+
return true;
34+
}
3135
std::string log_level_;
3236
if (!log_level.has_value()) {
3337
log_level_ = "INFO";

0 commit comments

Comments
 (0)