File size: 918 Bytes
8e2b0d5
2986576
90994d6
8e2b0d5
90994d6
 
 
8e2b0d5
90994d6
 
8e2b0d5
 
 
2986576
90994d6
 
8e2b0d5
90994d6
 
8e2b0d5
2986576
 
 
70aab77
6a7d6ee
8e2b0d5
6a7d6ee
 
8e2b0d5
90994d6
 
8e2b0d5
6a7d6ee
 
8e2b0d5
2986576
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Usa Python 3.10-slim
FROM python:3.10-slim

# Installiamo le dipendenze e l'adattatore 'musl' che manca
RUN apt-get update && apt-get install -y \
    build-essential \
    wget \
    musl \
    && rm -rf /var/lib/apt/lists/*

# CREIAMO IL PONTE: Questo risolve l'errore 'libc.musl-x86_64.so.1'
RUN ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1

# Cartella di lavoro
WORKDIR /code

# Copiamo i requisiti
COPY ./requirements.txt /code/requirements.txt

# Installazione veloce della versione 0.3.2
RUN pip install --no-cache-dir \
    --only-binary llama-cpp-python \
    --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
    llama-cpp-python==0.3.2

# Installiamo il resto
RUN pip install --no-cache-dir -r /code/requirements.txt

# Copiamo il resto dei file
COPY . .

# Permessi totali per evitare blocchi
RUN chmod -R 777 /code

# Comando di avvio
CMD ["python", "app.py"]