Open faibistes opened 7 months ago
Hi, it's an unexpected BUG because I know there're people using LLamaSharp in dockers successfully. Which docker image are you using, or it just crashes in any kinds of docker image?
This is the Dockerfile:
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:8.0.2-alpine3.19 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:8.0.201-alpine3.19 AS build
WORKDIR /src
#COPY ["nuget.config", "."]
COPY ["DocGenerator.Pruebas/DocGenerator.Pruebas.csproj", "DocGenerator.Pruebas/"]
COPY ["DocGenerator.Llama/DocGenerator.Llama.csproj", "DocGenerator.Llama/"]
RUN dotnet restore "DocGenerator.Pruebas/DocGenerator.Pruebas.csproj"
COPY . .
WORKDIR "/src/DocGenerator.Pruebas"
RUN dotnet build "DocGenerator.Pruebas.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "DocGenerator.Pruebas.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENV ASPNETCORE_ENVIRONMENT Production
RUN ln -snf /usr/share/zoneinfo/Europe/Madrid /etc/localtime && echo Europe/Madrid > /etc/timezone
ENTRYPOINT ["tail", "-f", "/dev/null"]
Docker version 19.03.13, build 4484c46d9d
This minimal program:
with these dependencies:
Crashes with segmentation fault inside a docker container. The machine has 32 GB of RAM. The program doesn't crash on my windows dev machine, with the same model (codellama)
lscpu: