chunkr-api / Dockerfile
KJ24's picture
Update Dockerfile
59c38e1 verified
raw
history blame
798 Bytes
FROM python:3.10
# ✅ Installer les outils nécessaires pour llama-cpp
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
&& rm -rf /var/lib/apt/lists/*
# ✅ Crée un dossier cache autorisé dans le container (important pour Hugging Face)
ENV HF_HOME=/app/cache
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_MODULES_CACHE=/app/cache
ENV HF_HUB_CACHE=/app/cache
# ✅ Crée le dossier de cache avec droits d’accès
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Dossier de travail
WORKDIR /app
# Installer les dépendances
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copier le code
COPY . .
# ✅ Exposer le port API
EXPOSE 7860
# ✅ Lancer FastAPI
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]