chat_modele / Dockerfile
mbaye
test gemma
e4658d9
raw
history blame contribute delete
832 Bytes
# Dockerfile pour lancer Ollama avec un modèle spécifique
FROM ubuntu:latest
# Installation des dépendances de base
RUN apt-get update && apt-get install -y \
curl \
python3 \
python3-pip \
python3-venv \
&& apt-get clean \
&& curl https://ollama.ai/install.sh | sh
# Configuration de l'application
WORKDIR /app
COPY . .
RUN chmod +x start.sh
# Création et activation de l'environnement virtuel
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Installation des dépendances Python dans l'environnement virtuel
RUN pip3 install --no-cache-dir -r requirements.txt
# Configuration Ollama
#ENV model="mistral:7b-instruct-q4_K_M"
ENV model="gemma:2b"
RUN mkdir -p /.ollama && chmod 777 /.ollama
# Exposition des ports (FastAPI et Ollama)
EXPOSE 7860 11434
# Démarrage
CMD ["./start.sh"]