chunkr-api / Dockerfile
KJ24's picture
Update Dockerfile
a84baaf verified
raw
history blame
823 Bytes
# 📦 Image de base
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/*
# ✅ Rediriger le cache HF vers un dossier autorisé dans le conteneur
ENV HF_HOME=/app/cache
ENV TRANSFORMERS_CACHE=/app/cache
ENV HF_MODULES_CACHE=/app/cache
ENV HF_HUB_CACHE=/app/cache
# ✅ Créer le dossier de cache avec accès total
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 tout le code
COPY . .
# 🌐 Exposer le port HTTP
EXPOSE 7860
# 🚀 Lancer FastAPI
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]