File size: 747 Bytes
189cefb
 
 
 
 
 
 
 
 
 
 
76a817e
189cefb
cdea4b3
 
189cefb
3e1c70f
189cefb
 
 
 
 
2b59f65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Usa una imagen base oficial de Python
FROM python:3.12

# Agrega un usuario no root
RUN useradd -m -u 1000 app

# Establece el directorio de trabajo dentro del contenedor
WORKDIR /home/app

RUN apt update
RUN apt install -y wget make cmake clang git g++
RUN wget https://huggingface.co/Qwen/Qwen2-0.5B-Instruct-GGUF/resolve/main/qwen2-0_5b-instruct-q5_0.gguf?download=true -O llama-model.gguf
RUN git clone https://github.com/ggerganov/llama.cpp
RUN mv llama.cpp llama_temp
RUN mv llama_temp/* .
RUN make
RUN apt install socat -y

# Expone el puerto en el que Flask se ejecutará dentro del contenedor
EXPOSE 7860

# Comando para ejecutar la aplicación Flask
CMD ["sh", "-c", "./server -m /home/app/llama-model.gguf --host 0.0.0.0 --port 7860"]