musl errors

master
prplV 2025-06-25 06:53:06 -04:00
parent 4514ecdfce
commit 245aa9f536
3 changed files with 53 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
.env
.env.example
README.md
target

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
FROM rust:latest AS builder
WORKDIR /app
RUN apt update && apt install -y musl-tools \
pkg-config \
libssl-dev \
openssl
RUN rustup target add x86_64-unknown-linux-gnu
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
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/target/x86_64-unknown-linux-gnu/release/ml-api /app/ml-api
RUN ls /app
RUN apk add --no-cache ca-certificates
EXPOSE 5134
ENTRYPOINT ["/app/ml-api"]

22
docker-compose.yml Normal file
View File

@ -0,0 +1,22 @@
services:
ollama-api:
container_name: ollama-api
image: ollama-api:dev
networks:
- ollama-api-net
environment:
- NOXIS_SOCKET_PATH=./noxis.sock
- NOXIS_PROXY_PORT=7654
- NOXIS_LOG_LEVEL=TRACE
- ML_TARGET_URL=http://192.168.231.89:11434/api/generate
- ML_MODEL_NAME=kis-test
- ML_REQUEST_TIMEOUT=10
- ML_LOG_LEVEL=TRACE
- ML_API_PORT=5134
ports:
- 5134:5134
restart: always
networks:
ollama-api-net:
driver: bridge