-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 842 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 842 Bytes
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
# Utilizar la imagen base de Ubuntu 20.04
FROM ubuntu:20.04
# Establecer variables de entorno para evitar interacciones durante la instalación
ENV DEBIAN_FRONTEND=noninteractive
# Actualizar e instalar dependencias necesarias
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
vim \
git \
python3-pip \
python3-venv \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Descargar e instalar Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
# Configurar directorio de datos persistentes para Ollama
RUN mkdir -p /root/.ollama && chown -R root:root /root/.ollama
# Exponer el puerto de Ollama
EXPOSE 11434
# Script de arranque que inicia Ollama y descarga modelos si no existen
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Comando de inicio
CMD ["/entrypoint.sh"]