Skip to content

Commit 253d510

Browse files
Merge pull request #17 from rwilliamspbg-ops/copilot/fix-build-docker-job7th
Fix server Docker builds for current Rust toolchain and CUDA feature wiring
2 parents bdfedd2 + 72fc747 commit 253d510

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

mohawk-server/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ edition = "2021"
55
description = "Production-ready LLM Inference Engine with GGUF support and OpenAI-compatible API"
66
license = "MIT"
77

8+
[features]
9+
cuda = ["llama-cpp-2/cuda"]
10+
811
[dependencies]
912
# Web Framework
1013
axum = { version = "0.7", features = ["macros"] }

mohawk-server/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Mohawk Inference Engine - CPU Version
2-
FROM rust:1.75-slim as builder
2+
FROM rust:1.87-slim AS builder
33

44
WORKDIR /app
55

@@ -12,6 +12,9 @@ RUN apt-get update && apt-get install -y \
1212
pkg-config \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15+
ENV CC=clang
16+
ENV CXX=clang++
17+
1518
# Copy source code
1619
COPY Cargo.toml Cargo.lock* ./
1720
COPY src/ ./src/

mohawk-server/Dockerfile.cuda

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Mohawk Inference Engine - CUDA Version
2-
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 as builder
2+
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS builder
33

44
WORKDIR /app
55

66
# Install build dependencies
77
RUN apt-get update && apt-get install -y \
8-
rustc \
9-
cargo \
8+
ca-certificates \
9+
curl \
1010
cmake \
1111
git \
1212
clang \
@@ -15,6 +15,12 @@ RUN apt-get update && apt-get install -y \
1515
protobuf-compiler \
1616
&& rm -rf /var/lib/apt/lists/*
1717

18+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.87.0 --profile minimal
19+
20+
ENV PATH="/root/.cargo/bin:${PATH}"
21+
ENV CC=clang
22+
ENV CXX=clang++
23+
1824
# Copy source code
1925
COPY Cargo.toml Cargo.lock* ./
2026
COPY src/ ./src/

0 commit comments

Comments
 (0)