builds fix

master
prplV 2025-06-25 10:27:26 -04:00
parent 245aa9f536
commit 1281f66518
4 changed files with 12 additions and 24 deletions

View File

@ -9,7 +9,7 @@ axum = { version = "0.8.4", features = ["ws"] }
dotenv = "0.15.0"
futures = "0.3.31"
lazy_static = "1.5.0"
reqwest = { version = "0.12.20", features = ["json", "rustls-tls"] }
reqwest = { version = "0.12.20", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
tokio = { version = "1.45.1", features = ["full"] }

View File

@ -1,27 +1,21 @@
FROM rust:latest AS builder
FROM rust:alpine AS builder
RUN apk add -q --no-cache build-base curl
WORKDIR /app
RUN apt update && apt install -y musl-tools \
pkg-config \
libssl-dev \
openssl
RUN rustup target add x86_64-unknown-linux-gnu
RUN rustup target add x86_64-unknown-linux-musl
COPY . .
# PKG_CONFIG_PATH VAR TESTING
ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc
ARG PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/openssl.pc
RUN cargo build --release --target=x86_64-unknown-linux-gnu
RUN cargo build --release --target=x86_64-unknown-linux-musl
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/target/x86_64-unknown-linux-gnu/release/ml-api /app/ml-api
RUN ls /app
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/ml-api /app/ml-api
RUN apk add --no-cache ca-certificates
EXPOSE 5134
EXPOSE 5134/tcp
ENTRYPOINT ["/app/ml-api"]

View File

@ -1,7 +1,7 @@
services:
ollama-api:
container_name: ollama-api
image: ollama-api:dev
image: ollama-api:musl-dev
networks:
- ollama-api-net
environment:

View File

@ -9,12 +9,6 @@ use std::sync::Arc;
type Config = Arc<ApiSessionConfig>;
pub mod openapi {
use super::{IntoResponse, StatusCode};
pub async fn swagger() -> impl IntoResponse { (StatusCode::NOT_IMPLEMENTED, "still in development ...") }
}
pub mod rest {
use tracing::trace;
use super::{IntoResponse, StatusCode, InputMetric, Json, Config, State};