modelo / Dockerfile
albertoo85's picture
Update Dockerfile
4190685 verified
raw
history blame contribute delete
584 Bytes
# Usamos la imagen oficial que YA tiene llama-cpp-python instalado y optimizado para CPU
FROM ghcr.io/abetlen/llama-cpp-python:latest
# Evitar archivos temporales y asegurar logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HOME=/home/user
# Crear usuario para Hugging Face
RUN useradd -m -u 1000 user
WORKDIR $HOME/app
# Instalamos Gradio y hf_hub (llama-cpp-python YA está instalado en esta imagen)
RUN pip install --no-cache-dir gradio huggingface-hub psutil
# Copiamos la aplicación
COPY --chown=user . $HOME/app/
USER user
EXPOSE 7860
CMD ["python", "app.py"]