Spaces:
Sleeping
Sleeping
Dmitry Beresnev commited on
Commit ·
acdc6c1
1
Parent(s): fe156b2
fix build bugs
Browse files- Dockerfile +10 -1
- cpp/llm_manager_types.h +1 -1
- cpp/runtime_components.cpp +1 -0
- cpp/server.cpp +1 -0
Dockerfile
CHANGED
|
@@ -57,7 +57,16 @@ RUN git clone --depth 1 --branch ${LLAMA_CPP_REF} https://github.com/ggerganov/l
|
|
| 57 |
# Build C++ manager (Boost.Beast + JSON)
|
| 58 |
COPY cpp/ /build/cpp/
|
| 59 |
RUN g++ -std=c++17 -O2 -DBOOST_ERROR_CODE_HEADER_ONLY -pthread \
|
| 60 |
-
/build/cpp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
# Runtime stage
|
| 63 |
FROM debian:bookworm-slim
|
|
|
|
| 57 |
# Build C++ manager (Boost.Beast + JSON)
|
| 58 |
COPY cpp/ /build/cpp/
|
| 59 |
RUN g++ -std=c++17 -O2 -DBOOST_ERROR_CODE_HEADER_ONLY -pthread \
|
| 60 |
+
-I/build/cpp \
|
| 61 |
+
/build/cpp/config.cpp \
|
| 62 |
+
/build/cpp/http_helpers.cpp \
|
| 63 |
+
/build/cpp/llm_manager.cpp \
|
| 64 |
+
/build/cpp/llm_manager_types.cpp \
|
| 65 |
+
/build/cpp/model_manager.cpp \
|
| 66 |
+
/build/cpp/request_parsing.cpp \
|
| 67 |
+
/build/cpp/runtime_components.cpp \
|
| 68 |
+
/build/cpp/server.cpp \
|
| 69 |
+
-o /build/llm-manager
|
| 70 |
|
| 71 |
# Runtime stage
|
| 72 |
FROM debian:bookworm-slim
|
cpp/llm_manager_types.h
CHANGED
|
@@ -147,7 +147,7 @@ struct RequestContext {
|
|
| 147 |
std::atomic<RequestState> state{RequestState::QUEUED};
|
| 148 |
std::atomic<bool> cancelled{false};
|
| 149 |
std::chrono::steady_clock::time_point created_at{std::chrono::steady_clock::now()};
|
| 150 |
-
std::chrono::steady_clock::time_point enqueue_time{
|
| 151 |
std::chrono::steady_clock::time_point start_time{};
|
| 152 |
std::mutex mu;
|
| 153 |
std::condition_variable cv;
|
|
|
|
| 147 |
std::atomic<RequestState> state{RequestState::QUEUED};
|
| 148 |
std::atomic<bool> cancelled{false};
|
| 149 |
std::chrono::steady_clock::time_point created_at{std::chrono::steady_clock::now()};
|
| 150 |
+
std::chrono::steady_clock::time_point enqueue_time{std::chrono::steady_clock::now()};
|
| 151 |
std::chrono::steady_clock::time_point start_time{};
|
| 152 |
std::mutex mu;
|
| 153 |
std::condition_variable cv;
|
cpp/runtime_components.cpp
CHANGED
|
@@ -6,6 +6,7 @@
|
|
| 6 |
|
| 7 |
#include <algorithm>
|
| 8 |
#include <sstream>
|
|
|
|
| 9 |
|
| 10 |
RateLimiterStore::RateLimiterStore(const RateLimitConfig &config)
|
| 11 |
: requests_per_minute_(std::max(0, config.requests_per_minute)),
|
|
|
|
| 6 |
|
| 7 |
#include <algorithm>
|
| 8 |
#include <sstream>
|
| 9 |
+
#include <utility>
|
| 10 |
|
| 11 |
RateLimiterStore::RateLimiterStore(const RateLimitConfig &config)
|
| 12 |
: requests_per_minute_(std::max(0, config.requests_per_minute)),
|
cpp/server.cpp
CHANGED
|
@@ -9,6 +9,7 @@
|
|
| 9 |
|
| 10 |
#include <algorithm>
|
| 11 |
#include <atomic>
|
|
|
|
| 12 |
|
| 13 |
namespace beast = boost::beast;
|
| 14 |
namespace http = beast::http;
|
|
|
|
| 9 |
|
| 10 |
#include <algorithm>
|
| 11 |
#include <atomic>
|
| 12 |
+
#include <utility>
|
| 13 |
|
| 14 |
namespace beast = boost::beast;
|
| 15 |
namespace http = beast::http;
|