From 389cb9723f955ef32f8967383e6513f8fffeed74 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:16:32 +0000 Subject: [PATCH 1/2] Initial plan From 72fc7471f94244c21ccdb834be28d85d189a9020 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Jul 2026 22:47:30 +0000 Subject: [PATCH 2/2] fix docker build toolchain and cuda feature wiring --- mohawk-server/Cargo.toml | 3 +++ mohawk-server/Dockerfile | 5 ++++- mohawk-server/Dockerfile.cuda | 12 +++++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mohawk-server/Cargo.toml b/mohawk-server/Cargo.toml index 3c473ea..1ad6e51 100644 --- a/mohawk-server/Cargo.toml +++ b/mohawk-server/Cargo.toml @@ -5,6 +5,9 @@ edition = "2021" description = "Production-ready LLM Inference Engine with GGUF support and OpenAI-compatible API" license = "MIT" +[features] +cuda = ["llama-cpp-2/cuda"] + [dependencies] # Web Framework axum = { version = "0.7", features = ["macros"] } diff --git a/mohawk-server/Dockerfile b/mohawk-server/Dockerfile index 51ccc2c..b3aa18c 100644 --- a/mohawk-server/Dockerfile +++ b/mohawk-server/Dockerfile @@ -1,5 +1,5 @@ # Mohawk Inference Engine - CPU Version -FROM rust:1.75-slim as builder +FROM rust:1.87-slim AS builder WORKDIR /app @@ -12,6 +12,9 @@ RUN apt-get update && apt-get install -y \ pkg-config \ && rm -rf /var/lib/apt/lists/* +ENV CC=clang +ENV CXX=clang++ + # Copy source code COPY Cargo.toml Cargo.lock* ./ COPY src/ ./src/ diff --git a/mohawk-server/Dockerfile.cuda b/mohawk-server/Dockerfile.cuda index 0806d31..00abdf8 100644 --- a/mohawk-server/Dockerfile.cuda +++ b/mohawk-server/Dockerfile.cuda @@ -1,12 +1,12 @@ # Mohawk Inference Engine - CUDA Version -FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 as builder +FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS builder WORKDIR /app # Install build dependencies RUN apt-get update && apt-get install -y \ - rustc \ - cargo \ + ca-certificates \ + curl \ cmake \ git \ clang \ @@ -15,6 +15,12 @@ RUN apt-get update && apt-get install -y \ protobuf-compiler \ && rm -rf /var/lib/apt/lists/* +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.87.0 --profile minimal + +ENV PATH="/root/.cargo/bin:${PATH}" +ENV CC=clang +ENV CXX=clang++ + # Copy source code COPY Cargo.toml Cargo.lock* ./ COPY src/ ./src/