Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
echo "apiServerHost: 0.0.0.0" > /root/.cortexrc
echo "enableCors: true" >> /root/.cortexrc

# Start the cortex server
cortex start

# Install the engine
cortex engines install llama-cpp -s /opt/cortex.llamacpp

# Start the cortex server
cortex start
cortex engines list


# Keep the container running by tailing the log files
tail -f /root/cortexcpp/logs/cortex.log &
tail -f /root/cortexcpp/logs/cortex-cli.log &
Expand Down
11 changes: 9 additions & 2 deletions engine/services/model_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,15 @@ cpp::result<void, std::string> ModelService::DeleteModel(
fs::path(model_entry.value().path_to_model_yaml));
yaml_handler.ModelConfigFromFile(yaml_fp.string());
auto mc = yaml_handler.GetModelConfig();
// Remove yaml file
std::filesystem::remove(yaml_fp);
// Remove yaml files
for (const auto& entry :
std::filesystem::directory_iterator(yaml_fp.parent_path())) {
if (entry.is_regular_file() && (entry.path().extension() == ".yml")) {
std::filesystem::remove(entry);
CTL_INF("Removed: " << entry.path().string());
}
}

// Remove model files if they are not imported locally
if (model_entry.value().branch_name != "imported" &&
!engine_svc_->IsRemoteEngine(mc.engine)) {
Expand Down
Loading